diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-02-14 14:16:06 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-14 22:26:43 +0300 |
commit | 65ed8ff376c4fdd8dd560b3ddbf7d6cd771f860e (patch) | |
tree | 18c3c16a542f5b8e86e201e901ed081c146d3028 /t | |
parent | b2e45c695d09f6a31ce09347ae0a5d2cdfe9dd4e (diff) |
am: support --quit
Among the "in progress" commands, only git-am and git-merge do not
support --quit. Support --quit in git-am too.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t4150-am.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 73b67b4280..512c754e02 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -1045,4 +1045,16 @@ test_expect_success 'am works with multi-line in-body headers' ' git cat-file commit HEAD | grep "^$LONG$" ' +test_expect_success 'am --quit keeps HEAD where it is' ' + mkdir .git/rebase-apply && + >.git/rebase-apply/last && + >.git/rebase-apply/next && + git rev-parse HEAD^ >.git/ORIG_HEAD && + git rev-parse HEAD >expected && + git am --quit && + test_path_is_missing .git/rebase-apply && + git rev-parse HEAD >actual && + test_cmp expected actual +' + test_done |