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 @@ -1086,6 +1086,27 @@ test_expect_success 'checkout -p patch editing of added file' '
1086
1086
)
1087
1087
'
1088
1088
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
+
1089
1110
test_expect_success ' show help from add--helper' '
1090
1111
git reset --hard &&
1091
1112
cat >expect <<-EOF &&
You can’t perform that action at this time.
0 commit comments