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 @@ -805,6 +805,27 @@ test_expect_success 'checkout -p works with pathological context lines' '
805
805
test_cmp expect a
806
806
'
807
807
808
+ test_expect_success EXPENSIVE ' add -i with a lot of files' '
809
+ git reset --hard &&
810
+ x160=0123456789012345678901234567890123456789 &&
811
+ x160=$x160$x160$x160$x160 &&
812
+ y= &&
813
+ i=0 &&
814
+ while test $i -le 200
815
+ do
816
+ name=$(printf "%s%03d" $x160 $i) &&
817
+ echo $name >$name &&
818
+ git add -N $name &&
819
+ y="${y}y$LF" &&
820
+ i=$(($i+1)) ||
821
+ break
822
+ done &&
823
+ echo "$y" | git add -p -- . &&
824
+ git diff --cached >staged &&
825
+ test_line_count = 1407 staged &&
826
+ git reset --hard
827
+ '
828
+
808
829
test_expect_success ' show help from add--helper' '
809
830
git reset --hard &&
810
831
cat >expect <<-EOF &&
You can’t perform that action at this time.
0 commit comments