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