Commit 8373150 1 parent 2584706 commit 8373150 Copy full SHA for 8373150
File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1044,6 +1044,27 @@ test_expect_success 'checkout -p patch editing of added file' '
1044
1044
)
1045
1045
'
1046
1046
1047
+ test_expect_success EXPENSIVE ' add -i with a lot of files' '
1048
+ git reset --hard &&
1049
+ x160=0123456789012345678901234567890123456789 &&
1050
+ x160=$x160$x160$x160$x160 &&
1051
+ y= &&
1052
+ i=0 &&
1053
+ while test $i -le 200
1054
+ do
1055
+ name=$(printf "%s%03d" $x160 $i) &&
1056
+ echo $name >$name &&
1057
+ git add -N $name &&
1058
+ y="${y}y$LF" &&
1059
+ i=$(($i+1)) ||
1060
+ exit 1
1061
+ done &&
1062
+ echo "$y" | git add -p -- . &&
1063
+ git diff --cached >staged &&
1064
+ test_line_count = 1407 staged &&
1065
+ git reset --hard
1066
+ '
1067
+
1047
1068
test_expect_success ' show help from add--helper' '
1048
1069
git reset --hard &&
1049
1070
cat >expect <<-EOF &&
You can’t perform that action at this time.
0 commit comments