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 @@ -743,6 +743,27 @@ test_expect_success 'add -p patch editing works with pathological context lines'
743
743
test_cmp expected-2 actual
744
744
'
745
745
746
+ test_expect_success EXPENSIVE ' add -i with a lot of files' '
747
+ git reset --hard &&
748
+ x160=0123456789012345678901234567890123456789 &&
749
+ x160=$x160$x160$x160$x160 &&
750
+ y= &&
751
+ i=0 &&
752
+ while test $i -le 200
753
+ do
754
+ name=$(printf "%s%03d" $x160 $i) &&
755
+ echo $name >$name &&
756
+ git add -N $name &&
757
+ y="${y}y$LF" &&
758
+ i=$(($i+1)) ||
759
+ break
760
+ done &&
761
+ echo "$y" | git add -p -- . &&
762
+ git diff --cached >staged &&
763
+ test_line_count = 1407 staged &&
764
+ git reset --hard
765
+ '
766
+
746
767
test_expect_success ' show help from add--helper' '
747
768
git reset --hard &&
748
769
cat >expect <<-EOF &&
You can’t perform that action at this time.
0 commit comments