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 @@ -1053,6 +1053,27 @@ test_expect_success 'checkout -p patch editing of added file' '
1053
1053
)
1054
1054
'
1055
1055
1056
+ test_expect_success EXPENSIVE ' add -i with a lot of files' '
1057
+ git reset --hard &&
1058
+ x160=0123456789012345678901234567890123456789 &&
1059
+ x160=$x160$x160$x160$x160 &&
1060
+ y= &&
1061
+ i=0 &&
1062
+ while test $i -le 200
1063
+ do
1064
+ name=$(printf "%s%03d" $x160 $i) &&
1065
+ echo $name >$name &&
1066
+ git add -N $name &&
1067
+ y="${y}y$LF" &&
1068
+ i=$(($i+1)) ||
1069
+ exit 1
1070
+ done &&
1071
+ echo "$y" | git add -p -- . &&
1072
+ git diff --cached >staged &&
1073
+ test_line_count = 1407 staged &&
1074
+ git reset --hard
1075
+ '
1076
+
1056
1077
test_expect_success ' show help from add--helper' '
1057
1078
git reset --hard &&
1058
1079
cat >expect <<-EOF &&
You can’t perform that action at this time.
0 commit comments