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>
freku045@student.liu.se committed
Dec 13, 2005 at 23:30 UTC
3ae39ab232a103c2a4284a6701be62d95f0d0987
1 file changed
+3
-2
git-rebase.sh
+3
-2
@@ -3,6 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano.
4
#
5
6
+USAGE='<upstream> [<head>]'
7
. git-sh-setup
8
9
# Make sure we do not have .dotest
@@ -19,7 +20,7 @@ you still have something valuable there.'
20
fi
21
22
# The other head is given. Make sure it is valid.
22
-other=$(git-rev-parse --verify "$1^0") || exit
23
+other=$(git-rev-parse --verify "$1^0") || usage
24
25
# Make sure we have HEAD that is valid.
26
head=$(git-rev-parse --verify "HEAD^0") || exit
@@ -36,7 +37,7 @@ esac
37
# If the branch to rebase is given, first switch to it.
38
case "$#" in
39
2)
39
- git-checkout "$2" || exit
40
+ git-checkout "$2" || usage
41
esac
42
43
# If the HEAD is a proper descendant of $other, we do not even need