Skip to content

Commit 7fb090e

Browse files
committed
t3701: verify that we can add *lots* of files interactively
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c2c5a48 commit 7fb090e

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
@@ -596,4 +596,25 @@ test_expect_success 'add -p patch editing works with pathological context lines'
596596
test_cmp expected-2 actual
597597
'
598598

599+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
600+
git reset --hard &&
601+
x160=0123456789012345678901234567890123456789 &&
602+
x160=$x160$x160$x160$x160 &&
603+
y= &&
604+
i=0 &&
605+
while test $i -le 200
606+
do
607+
name=$(printf "%s%03d" $x160 $i) &&
608+
echo $name >$name &&
609+
git add -N $name &&
610+
y="${y}y$LF" &&
611+
i=$(($i+1)) ||
612+
break
613+
done &&
614+
echo "$y" | git add -p -- . &&
615+
git diff --cached >staged &&
616+
test_line_count = 1407 staged &&
617+
git reset --hard
618+
'
619+
599620
test_done

0 commit comments

Comments
 (0)