diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-21 10:35:53 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-21 11:16:28 -0800 |
commit | 7b3b7e37581fb5266a260687c21af1571b4ade81 (patch) | |
tree | 62f8028ae58d7b6d6d6b372b9cd0b1e692fb6e44 /t/t4151-am-abort.sh | |
parent | 05bb5a2584ca0e1c87a2135a83c5573b9337d06f (diff) | |
download | git-7b3b7e37581fb5266a260687c21af1571b4ade81.tar.gz |
am --abort: keep unrelated commits since the last failure and warn
After making commits (either by pulling or doing their own work) after a
failed "am", the user will be reminded by next "am" invocation that there
was a failed "am" that the user needs to decide to resolve or to get rid
of the old "am" attempt. The "am --abort" option was meant to help the
latter. However, it rewinded the HEAD back to the beginning of the failed
"am" attempt, discarding commits made (perhaps by mistake) since.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4151-am-abort.sh')
-rwxr-xr-x | t/t4151-am-abort.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh index b55c411788..c95c4ccc39 100755 --- a/t/t4151-am-abort.sh +++ b/t/t4151-am-abort.sh @@ -62,4 +62,13 @@ do done +test_expect_success 'am --abort will keep the local commits intact' ' + test_must_fail git am 0004-*.patch && + test_commit unrelated && + git rev-parse HEAD >expect && + git am --abort && + git rev-parse HEAD >actual && + test_cmp expect actual +' + test_done |