diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-17 15:02:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-17 15:02:20 -0700 |
commit | f0c344ce578f71aeeee7d40cc01e66f74506ecf9 (patch) | |
tree | 9dceeebeff284e4ef6fa942c3b4271d03899a805 /t | |
parent | Git 2.25.1 (diff) | |
parent | built-in add -i: accept open-ended ranges again (diff) | |
download | tgif-f0c344ce578f71aeeee7d40cc01e66f74506ecf9.tar.xz |
Merge branch 'js/builtin-add-i-cmds' into maint
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')
-rwxr-xr-x | t/t3701-add-interactive.sh | 9 |
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 && |