diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-31 12:09:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-31 12:09:08 -0700 |
commit | df873f96c8132c30d0cbd2b62b726d42d54dc58a (patch) | |
tree | 71c49410b0e5fedab7b010d6e89f29c2c69645fc | |
parent | Merge branch 'jk/maint-docs' (diff) | |
parent | rebase: write a reflog entry when finishing (diff) | |
download | tgif-df873f96c8132c30d0cbd2b62b726d42d54dc58a.tar.xz |
Merge branch 'jk/rebase-head-reflog'
* jk/rebase-head-reflog:
rebase: write a reflog entry when finishing
rebase: create HEAD reflog entry when aborting
-rw-r--r-- | git-rebase--interactive.sh | 4 | ||||
-rwxr-xr-x | git-rebase.sh | 6 | ||||
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 41ba96aeb7..65690af893 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -510,7 +510,9 @@ do_next () { refs/*) message="$GIT_REFLOG_ACTION: $head_name onto $shortonto" && git update-ref -m "$message" $head_name $newhead $orig_head && - git symbolic-ref HEAD $head_name + git symbolic-ref \ + -m "$GIT_REFLOG_ACTION: returning to $head_name" \ + HEAD $head_name ;; esac && { test ! -f "$state_dir"/verbose || diff --git a/git-rebase.sh b/git-rebase.sh index 7a54bfc618..d7855ea1c6 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -153,7 +153,9 @@ move_to_original_branch () { message="rebase finished: $head_name onto $onto" git update-ref -m "$message" \ $head_name $(git rev-parse HEAD) $orig_head && - git symbolic-ref HEAD $head_name || + git symbolic-ref \ + -m "rebase finished: returning to $head_name" \ + HEAD $head_name || die "Could not move back to $head_name" ;; esac @@ -332,7 +334,7 @@ abort) read_basic_state case "$head_name" in refs/*) - git symbolic-ref HEAD $head_name || + git symbolic-ref -m "rebase: aborting" HEAD $head_name || die "Could not move back to $head_name" ;; esac diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 7d8147bb93..47c8371c7e 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -317,7 +317,7 @@ test_expect_success '--continue tries to commit' ' ' test_expect_success 'verbose flag is heeded, even after --continue' ' - git reset --hard HEAD@{1} && + git reset --hard master@{1} && test_tick && test_must_fail git rebase -v -i --onto new-branch1 HEAD^ && echo resolved > file1 && |