File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -953,6 +953,27 @@ test_expect_success 'checkout -p patch editing of added file' '
953
953
)
954
954
'
955
955
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
+
956
977
test_expect_success ' show help from add--helper' '
957
978
git reset --hard &&
958
979
cat >expect <<-EOF &&
You can’t perform that action at this time.
0 commit comments