Skip to content

Commit 767d92e

Browse files
dschoGit for Windows Build Agent
authored andcommitted
t3701: verify that we can add *lots* of files interactively
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 0db459e commit 767d92e

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
@@ -953,6 +953,27 @@ test_expect_success 'checkout -p patch editing of added file' '
953953
)
954954
'
955955

956+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
957+
git reset --hard &&
958+
x160=0123456789012345678901234567890123456789 &&
959+
x160=$x160$x160$x160$x160 &&
960+
y= &&
961+
i=0 &&
962+
while test $i -le 200
963+
do
964+
name=$(printf "%s%03d" $x160 $i) &&
965+
echo $name >$name &&
966+
git add -N $name &&
967+
y="${y}y$LF" &&
968+
i=$(($i+1)) ||
969+
break
970+
done &&
971+
echo "$y" | git add -p -- . &&
972+
git diff --cached >staged &&
973+
test_line_count = 1407 staged &&
974+
git reset --hard
975+
'
976+
956977
test_expect_success 'show help from add--helper' '
957978
git reset --hard &&
958979
cat >expect <<-EOF &&

0 commit comments

Comments
 (0)