Commits

Anonymous committed 3ae39ab

git-rebase: Usage string clean-up, emit usage string at incorrect invocation

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Comments (0)

Files changed (1)

 # Copyright (c) 2005 Junio C Hamano.
 #
 
+USAGE='<upstream> [<head>]'
 . git-sh-setup
 
 # Make sure we do not have .dotest
 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
 # 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