Skip to content

Commit 8024aa7

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

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
@@ -740,6 +740,27 @@ test_expect_success 'add -p patch editing works with pathological context lines'
740740
test_cmp expected-2 actual
741741
'
742742

743+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
744+
git reset --hard &&
745+
x160=0123456789012345678901234567890123456789 &&
746+
x160=$x160$x160$x160$x160 &&
747+
y= &&
748+
i=0 &&
749+
while test $i -le 200
750+
do
751+
name=$(printf "%s%03d" $x160 $i) &&
752+
echo $name >$name &&
753+
git add -N $name &&
754+
y="${y}y$LF" &&
755+
i=$(($i+1)) ||
756+
break
757+
done &&
758+
echo "$y" | git add -p -- . &&
759+
git diff --cached >staged &&
760+
test_line_count = 1407 staged &&
761+
git reset --hard
762+
'
763+
743764
test_expect_success 'show help from add--helper' '
744765
git reset --hard &&
745766
cat >expect <<-EOF &&

0 commit comments

Comments
 (0)