Skip to content

Commit 5049df3

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

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
@@ -380,4 +380,25 @@ test_expect_success 'patch mode ignores unmerged entries' '
380380
test_cmp expected diff
381381
'
382382

383+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
384+
git reset --hard &&
385+
x160=0123456789012345678901234567890123456789 &&
386+
x160=$x160$x160$x160$x160 &&
387+
y= &&
388+
i=0 &&
389+
while test $i -le 200
390+
do
391+
name=$(printf "%s%03d" $x160 $i) &&
392+
echo $name >$name &&
393+
git add -N $name &&
394+
y="${y}y$LF" &&
395+
i=$(($i+1)) ||
396+
break
397+
done &&
398+
echo "$y" | git add -p -- . &&
399+
git diff --cached >staged &&
400+
test_line_count = 1407 staged &&
401+
git reset --hard
402+
'
403+
383404
test_done

0 commit comments

Comments
 (0)