summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-rebase.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 0f379ba2b5..fd72a35c65 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -601,11 +601,23 @@ then
test -z "$switch_to" ||
GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $switch_to" \
git checkout -q "$switch_to" --
- say "$(eval_gettext "Current branch \$branch_name is up to date.")"
+ if test "$branch_name" = "HEAD" &&
+ ! git symbolic-ref -q HEAD
+ then
+ say "$(eval_gettext "HEAD is up to date.")"
+ else
+ say "$(eval_gettext "Current branch \$branch_name is up to date.")"
+ fi
finish_rebase
exit 0
else
- say "$(eval_gettext "Current branch \$branch_name is up to date, rebase forced.")"
+ if test "$branch_name" = "HEAD" &&
+ ! git symbolic-ref -q HEAD
+ then
+ say "$(eval_gettext "HEAD is up to date, rebase forced.")"
+ else
+ say "$(eval_gettext "Current branch \$branch_name is up to date, rebase forced.")"
+ fi
fi
fi