Skip to content

Commit 7cb4725

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
t3701: verify that we can add *lots* of files interactively
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent d4d15b3 commit 7cb4725

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
@@ -743,6 +743,27 @@ test_expect_success 'add -p patch editing works with pathological context lines'
743743
test_cmp expected-2 actual
744744
'
745745

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

0 commit comments

Comments
 (0)