aboutsummaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-18 12:48:20 -0700
committerJunio C Hamano <gitster@pobox.com>2013-07-18 12:48:20 -0700
commitafbfcaa98396de66e42dc3c845f396c5ba508ced (patch)
tree7c3e806f0f1bbfeb8a02971daf04c68c51f4840c /git-rebase.sh
parent001b0976afe6f41bff46aa3eaad0285b641a50ea (diff)
parent26cd160cb15635afd1c2937a3c15cfb256758323 (diff)
downloadgit-afbfcaa98396de66e42dc3c845f396c5ba508ced.tar.gz
git-afbfcaa98396de66e42dc3c845f396c5ba508ced.tar.xz
Merge branch 'rr/rebase-reflog-message-reword'
"git rebase [-i]" used to leave just "rebase" as its reflog message for some operations. This rewords them to be more informative. * rr/rebase-reflog-message-reword: rebase -i: use a better reflog message rebase: use a better reflog message
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 81b0346a5..0039ecfb4 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -542,7 +542,9 @@ then
if test -z "$force_rebase"
then
# Lazily switch to the target branch if needed...
- test -z "$switch_to" || git checkout "$switch_to" --
+ test -z "$switch_to" ||
+ GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $switch_to" \
+ git checkout "$switch_to" --
say "$(eval_gettext "Current branch \$branch_name is up to date.")"
finish_rebase
exit 0
@@ -568,7 +570,9 @@ test "$type" = interactive && run_specific_rebase
# Detach HEAD and reset the tree
say "$(gettext "First, rewinding head to replay your work on top of it...")"
-git checkout -q "$onto^0" || die "could not detach HEAD"
+
+GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $onto_name" \
+ git checkout -q "$onto^0" || die "could not detach HEAD"
git update-ref ORIG_HEAD $orig_head
# If the $onto is a proper descendant of the tip of the branch, then