From: Johannes Sixt Date: Tue, 28 Jun 2011 12:46:14 +0000 (+0200) Subject: rebase: do not print lots of usage hints after an obvious error message X-Git-Tag: v1.7.7-rc0~95^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=34840db83495e2112150e55bd7c36b0098d4824e;p=git.git rebase: do not print lots of usage hints after an obvious error message When a non-existent branch was specified to be rebased, the complete usage information is printed after the error message that carries the relevant piece of information: $ git rebase master topci fatal: no such branch: topci usage: git rebase [-i] [options] [--onto ] [] [] or: git rebase [-i] [options] --onto --root [] or: git-rebase [-i] --continue | --abort | --skip Available options are [30 lines of usage stripped] The error message was introduced recently by 4ac5356c (rebase: give a better error message for bogus branch, 2011-01-27), and the result was acceptable because the usage text was just two lines. But 45e2acf3 (rebase: define options in OPTIONS_SPEC, 2011-02-28) made things worse because the usage text is now 35 lines. Just drop the usage information because it does not add value to the error message. Signed-off-by: Johannes Sixt Acked-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/git-rebase.sh b/git-rebase.sh index 7a54bfc61..2075ccf78 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -439,8 +439,7 @@ case "$#" in then head_name="detached HEAD" else - echo >&2 "fatal: no such branch: $1" - usage + die "fatal: no such branch: $1" fi ;; *)