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 @@ -1085,6 +1085,27 @@ test_expect_success 'checkout -p patch editing of added file' '
1085
1085
)
1086
1086
'
1087
1087
1088
+ test_expect_success EXPENSIVE ' add -i with a lot of files' '
1089
+ git reset --hard &&
1090
+ x160=0123456789012345678901234567890123456789 &&
1091
+ x160=$x160$x160$x160$x160 &&
1092
+ y= &&
1093
+ i=0 &&
1094
+ while test $i -le 200
1095
+ do
1096
+ name=$(printf "%s%03d" $x160 $i) &&
1097
+ echo $name >$name &&
1098
+ git add -N $name &&
1099
+ y="${y}y$LF" &&
1100
+ i=$(($i+1)) ||
1101
+ exit 1
1102
+ done &&
1103
+ echo "$y" | git add -p -- . &&
1104
+ git diff --cached >staged &&
1105
+ test_line_count = 1407 staged &&
1106
+ git reset --hard
1107
+ '
1108
+
1088
1109
test_expect_success ' show help from add--helper' '
1089
1110
git reset --hard &&
1090
1111
cat >expect <<-EOF &&
You can’t perform that action at this time.
0 commit comments