Skip to content

Commit 2054fae

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

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
@@ -848,4 +848,25 @@ test_expect_success 'add -p selecting lines works with pathological context line
848848
test_cmp expected-2 actual
849849
'
850850

851+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
852+
git reset --hard &&
853+
x160=0123456789012345678901234567890123456789 &&
854+
x160=$x160$x160$x160$x160 &&
855+
y= &&
856+
i=0 &&
857+
while test $i -le 200
858+
do
859+
name=$(printf "%s%03d" $x160 $i) &&
860+
echo $name >$name &&
861+
git add -N $name &&
862+
y="${y}y$LF" &&
863+
i=$(($i+1)) ||
864+
break
865+
done &&
866+
echo "$y" | git add -p -- . &&
867+
git diff --cached >staged &&
868+
test_line_count = 1407 staged &&
869+
git reset --hard
870+
'
871+
851872
test_done

0 commit comments

Comments
 (0)