From: freku045@student.liu.se Date: Tue, 13 Dec 2005 22:30:32 +0000 (+0100) Subject: git-rebase: Usage string clean-up, emit usage string at incorrect invocation X-Git-Tag: v0.99.9n^2~7^2~2 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;ds=sidebyside;h=3ae39ab232a103c2a4284a6701be62d95f0d0987;p=git.git git-rebase: Usage string clean-up, emit usage string at incorrect invocation Signed-off-by: Fredrik Kuivinen Signed-off-by: Junio C Hamano --- diff --git a/git-rebase.sh b/git-rebase.sh index 638ff0db..8a5f44aa 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -3,6 +3,7 @@ # Copyright (c) 2005 Junio C Hamano. # +USAGE=' []' . git-sh-setup # Make sure we do not have .dotest @@ -19,7 +20,7 @@ you still have something valuable there.' fi # The other head is given. Make sure it is valid. -other=$(git-rev-parse --verify "$1^0") || exit +other=$(git-rev-parse --verify "$1^0") || usage # Make sure we have HEAD that is valid. head=$(git-rev-parse --verify "HEAD^0") || exit @@ -36,7 +37,7 @@ esac # If the branch to rebase is given, first switch to it. case "$#" in 2) - git-checkout "$2" || exit + git-checkout "$2" || usage esac # If the HEAD is a proper descendant of $other, we do not even need