Skip to content

Commit 5de44ff

Browse files
dschoGit for Windows Build Agent
authored andcommitted
t3701: verify that we can add *lots* of files interactively
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 0ede8bf commit 5de44ff

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

t/t3701-add-interactive.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,27 @@ test_expect_success 'checkout -p patch editing of added file' '
860860
)
861861
'
862862

863+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
864+
git reset --hard &&
865+
x160=0123456789012345678901234567890123456789 &&
866+
x160=$x160$x160$x160$x160 &&
867+
y= &&
868+
i=0 &&
869+
while test $i -le 200
870+
do
871+
name=$(printf "%s%03d" $x160 $i) &&
872+
echo $name >$name &&
873+
git add -N $name &&
874+
y="${y}y$LF" &&
875+
i=$(($i+1)) ||
876+
break
877+
done &&
878+
echo "$y" | git add -p -- . &&
879+
git diff --cached >staged &&
880+
test_line_count = 1407 staged &&
881+
git reset --hard
882+
'
883+
863884
test_expect_success 'show help from add--helper' '
864885
git reset --hard &&
865886
cat >expect <<-EOF &&

0 commit comments

Comments
 (0)