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 @@ -1047,6 +1047,27 @@ test_expect_success 'checkout -p patch editing of added file' '
1047
1047
)
1048
1048
'
1049
1049
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
+
1050
1071
test_expect_success ' show help from add--helper' '
1051
1072
git reset --hard &&
1052
1073
cat >expect <<-EOF &&
You can’t perform that action at this time.
0 commit comments