Skip to content

Commit 67ca10e

Browse files
committed
t3701: verify that we can add *lots* of files interactively
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 177f3d3 commit 67ca10e

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
@@ -1204,6 +1204,27 @@ test_expect_success 'checkout -p patch editing of added file' '
12041204
)
12051205
'
12061206

1207+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
1208+
git reset --hard &&
1209+
x160=0123456789012345678901234567890123456789 &&
1210+
x160=$x160$x160$x160$x160 &&
1211+
y= &&
1212+
i=0 &&
1213+
while test $i -le 200
1214+
do
1215+
name=$(printf "%s%03d" $x160 $i) &&
1216+
echo $name >$name &&
1217+
git add -N $name &&
1218+
y="${y}y$LF" &&
1219+
i=$(($i+1)) ||
1220+
exit 1
1221+
done &&
1222+
echo "$y" | git add -p -- . &&
1223+
git diff --cached >staged &&
1224+
test_line_count = 1407 staged &&
1225+
git reset --hard
1226+
'
1227+
12071228
test_expect_success 'show help from add--helper' '
12081229
git reset --hard &&
12091230
cat >expect <<-EOF &&

0 commit comments

Comments
 (0)