Skip to content

Commit b1cae9b

Browse files
dschomjcheetham
authored andcommitted
t3701: verify that we can add *lots* of files interactively
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 4edc6a9 commit b1cae9b

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
@@ -1047,6 +1047,27 @@ test_expect_success 'checkout -p patch editing of added file' '
10471047
)
10481048
'
10491049

1050+
test_expect_success EXPENSIVE 'add -i with a lot of files' '
1051+
git reset --hard &&
1052+
x160=0123456789012345678901234567890123456789 &&
1053+
x160=$x160$x160$x160$x160 &&
1054+
y= &&
1055+
i=0 &&
1056+
while test $i -le 200
1057+
do
1058+
name=$(printf "%s%03d" $x160 $i) &&
1059+
echo $name >$name &&
1060+
git add -N $name &&
1061+
y="${y}y$LF" &&
1062+
i=$(($i+1)) ||
1063+
exit 1
1064+
done &&
1065+
echo "$y" | git add -p -- . &&
1066+
git diff --cached >staged &&
1067+
test_line_count = 1407 staged &&
1068+
git reset --hard
1069+
'
1070+
10501071
test_expect_success 'show help from add--helper' '
10511072
git reset --hard &&
10521073
cat >expect <<-EOF &&

0 commit comments

Comments
 (0)