diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-04-25 13:28:53 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-25 13:28:54 +0900 |
commit | 4cbaa6b47fbdcf68bd06d4a6ebf550153fb18636 (patch) | |
tree | 321705992c4cbb3b4636258be1c612bb541223b5 /t | |
parent | Merge branch 'jk/t5561-missing-curl' (diff) | |
parent | t3200: verify "branch --list" sanity when rebasing from detached HEAD (diff) | |
download | tgif-4cbaa6b47fbdcf68bd06d4a6ebf550153fb18636.tar.xz |
Merge branch 'ks/branch-list-detached-rebase-i'
"git branch --list" during an interrupted "rebase -i" now lets
users distinguish the case where a detached HEAD is being rebased
and a normal branch is being rebased.
* ks/branch-list-detached-rebase-i:
t3200: verify "branch --list" sanity when rebasing from detached HEAD
branch --list: print useful info whilst interactive rebasing a detached HEAD
Diffstat (limited to 't')
-rwxr-xr-x | t/t3200-branch.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 6c0b7ea4ad..c0ef946811 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -6,6 +6,7 @@ test_description='git branch assorted tests' . ./test-lib.sh +. "$TEST_DIRECTORY"/lib-rebase.sh test_expect_success 'prepare a trivial repository' ' echo Hello >A && @@ -1246,6 +1247,29 @@ test_expect_success '--merged is incompatible with --no-merged' ' test_must_fail git branch --merged HEAD --no-merged HEAD ' +test_expect_success '--list during rebase' ' + test_when_finished "reset_rebase" && + git checkout master && + FAKE_LINES="1 edit 2" && + export FAKE_LINES && + set_fake_editor && + git rebase -i HEAD~2 && + git branch --list >actual && + test_i18ngrep "rebasing master" actual +' + +test_expect_success '--list during rebase from detached HEAD' ' + test_when_finished "reset_rebase && git checkout master" && + git checkout master^0 && + oid=$(git rev-parse --short HEAD) && + FAKE_LINES="1 edit 2" && + export FAKE_LINES && + set_fake_editor && + git rebase -i HEAD~2 && + git branch --list >actual && + test_i18ngrep "rebasing detached HEAD $oid" actual +' + test_expect_success 'tracking with unexpected .fetch refspec' ' rm -rf a b c d && git init a && |