Skip to content

Commit 673f572

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

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
@@ -1086,6 +1086,27 @@ test_expect_success 'checkout -p patch editing of added file' '
10861086
)
10871087
'
10881088

1089+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
1090+
git reset --hard &&
1091+
x160=0123456789012345678901234567890123456789 &&
1092+
x160=$x160$x160$x160$x160 &&
1093+
y= &&
1094+
i=0 &&
1095+
while test $i -le 200
1096+
do
1097+
name=$(printf "%s%03d" $x160 $i) &&
1098+
echo $name >$name &&
1099+
git add -N $name &&
1100+
y="${y}y$LF" &&
1101+
i=$(($i+1)) ||
1102+
exit 1
1103+
done &&
1104+
echo "$y" | git add -p -- . &&
1105+
git diff --cached >staged &&
1106+
test_line_count = 1407 staged &&
1107+
git reset --hard
1108+
'
1109+
10891110
test_expect_success 'show help from add--helper' '
10901111
git reset --hard &&
10911112
cat >expect <<-EOF &&

0 commit comments

Comments
 (0)