@matheusbsbs / matheus-bagliano / commits / 4ac5356c62
Fork 0

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>

Jeff King committed Jan 26, 2011 at 19:27 UTC 4ac5356c62d02b118c49cd85f88c7e6f65590400
1 file changed +1
git-rebase.sh
+1
@@ -491,6 +491,7 @@ case "$#" in
491 then
492 head_name="detached HEAD"
493 else
494 + echo >&2 "fatal: no such branch: $1"
495 usage
496 fi
497 ;;