提交 4ac5356c 编写于 作者: J Jeff King 提交者: Junio C Hamano

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: NJeff King <peff@peff.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 3b21a438
...@@ -491,6 +491,7 @@ case "$#" in ...@@ -491,6 +491,7 @@ case "$#" in
then then
head_name="detached HEAD" head_name="detached HEAD"
else else
echo >&2 "fatal: no such branch: $1"
usage usage
fi fi
;; ;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册