diff options
author | Jeff King <peff@peff.net> | 2011-01-27 01:27:11 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-01-27 02:27:02 +0100 |
commit | 4ac5356c62d02b118c49cd85f88c7e6f65590400 (patch) | |
tree | 6ed2a40995334d73d39f0a23fed0efc8c3b6a701 | |
parent | rebase: use explicit "--" with checkout (diff) | |
download | git-4ac5356c62d02b118c49cd85f88c7e6f65590400.tar.xz git-4ac5356c62d02b118c49cd85f88c7e6f65590400.zip |
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | git-rebase.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index 1f42fb75e7..26d5197a0f 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 ;; |