Skip to content

Commit e406874

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

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
@@ -805,6 +805,27 @@ test_expect_success 'checkout -p works with pathological context lines' '
805805
test_cmp expect a
806806
'
807807

808+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
809+
git reset --hard &&
810+
x160=0123456789012345678901234567890123456789 &&
811+
x160=$x160$x160$x160$x160 &&
812+
y= &&
813+
i=0 &&
814+
while test $i -le 200
815+
do
816+
name=$(printf "%s%03d" $x160 $i) &&
817+
echo $name >$name &&
818+
git add -N $name &&
819+
y="${y}y$LF" &&
820+
i=$(($i+1)) ||
821+
break
822+
done &&
823+
echo "$y" | git add -p -- . &&
824+
git diff --cached >staged &&
825+
test_line_count = 1407 staged &&
826+
git reset --hard
827+
'
828+
808829
test_expect_success 'show help from add--helper' '
809830
git reset --hard &&
810831
cat >expect <<-EOF &&

0 commit comments

Comments
 (0)