summaryrefslogtreecommitdiff
path: root/t/t3701-add-interactive.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-01-30 14:17:10 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-01-30 14:17:10 -0800
commitf0940743facd619f251009e0307d8d6452cc582e (patch)
tree2e2aa47257c3b6f3b1a55c842d0c5c9fcf21fd23 /t/t3701-add-interactive.sh
parentMerge branch 'jk/test-fixes' (diff)
parentbuilt-in add -i: accept open-ended ranges again (diff)
downloadtgif-f0940743facd619f251009e0307d8d6452cc582e.tar.xz
Merge branch 'js/builtin-add-i-cmds'
Minor bugfixes to "git add -i" that has recently been rewritten in C. * js/builtin-add-i-cmds: built-in add -i: accept open-ended ranges again built-in add -i: do not try to `patch`/`diff` an empty list of files
Diffstat (limited to 't/t3701-add-interactive.sh')
-rwxr-xr-xt/t3701-add-interactive.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 12ee321707..2182b1c030 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -68,6 +68,15 @@ test_expect_success 'revert works (initial)' '
! grep . output
'
+test_expect_success 'add untracked (multiple)' '
+ test_when_finished "git reset && rm [1-9]" &&
+ touch $(test_seq 9) &&
+ test_write_lines a "2-5 8-" | git add -i -- [1-9] &&
+ test_write_lines 2 3 4 5 8 9 >expected &&
+ git ls-files [1-9] >output &&
+ test_cmp expected output
+'
+
test_expect_success 'setup (commit)' '
echo baseline >file &&
git add file &&