From: Jeff King Date: Thu, 27 Jan 2011 00:27:11 +0000 (-0500) Subject: rebase: give a better error message for bogus branch X-Git-Tag: ko-maint~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4ac5356c;p=git.git rebase: give a better error message for bogus branch When you give a non-existent branch to git-rebase, it spits out the usage. This can be confusing, since you may understand the usage just fine, but simply have made a mistake in the branch name. Before: $ git rebase origin bogus Usage: git rebase ... After: $ git rebase origin bogus fatal: no such branch: bogus Usage: git rebase ... Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/git-rebase.sh b/git-rebase.sh index 1f42fb75e..26d5197a0 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -491,6 +491,7 @@ case "$#" in then head_name="detached HEAD" else + echo >&2 "fatal: no such branch: $1" usage fi ;;