Documentation: fix several one-character-off spelling errors
[gitweb.git] / git-rebase.sh
index a299bcc52029bb1cdcefb5d985b186df8fe8c242..fd72a35c65b43537b292445b87ffb7e682cc076a 100755 (executable)
@@ -477,7 +477,7 @@ then
                ;;
        esac
        upstream=$(peel_committish "${upstream_name}") ||
-       die "$(eval_gettext "invalid upstream \$upstream_name")"
+       die "$(eval_gettext "invalid upstream '\$upstream_name'")"
        upstream_arg="$upstream_name"
 else
        if test -z "$onto"
@@ -539,7 +539,7 @@ case "$#" in
                head_name="detached HEAD"
 
        else
-               die "$(eval_gettext "fatal: no such branch/commit: \$branch_name")"
+               die "$(eval_gettext "fatal: no such branch/commit '\$branch_name'")"
        fi
        ;;
 0)
@@ -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