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>
This commit is contained in:
parent
7ab099d220
commit
3ae39ab232
@ -3,6 +3,7 @@
|
|||||||
# Copyright (c) 2005 Junio C Hamano.
|
# Copyright (c) 2005 Junio C Hamano.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
USAGE='<upstream> [<head>]'
|
||||||
. git-sh-setup
|
. git-sh-setup
|
||||||
|
|
||||||
# Make sure we do not have .dotest
|
# Make sure we do not have .dotest
|
||||||
@ -19,7 +20,7 @@ you still have something valuable there.'
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# The other head is given. Make sure it is valid.
|
# 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.
|
# Make sure we have HEAD that is valid.
|
||||||
head=$(git-rev-parse --verify "HEAD^0") || exit
|
head=$(git-rev-parse --verify "HEAD^0") || exit
|
||||||
@ -36,7 +37,7 @@ esac
|
|||||||
# If the branch to rebase is given, first switch to it.
|
# If the branch to rebase is given, first switch to it.
|
||||||
case "$#" in
|
case "$#" in
|
||||||
2)
|
2)
|
||||||
git-checkout "$2" || exit
|
git-checkout "$2" || usage
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# If the HEAD is a proper descendant of $other, we do not even need
|
# If the HEAD is a proper descendant of $other, we do not even need
|
||||||
|
Loading…
Reference in New Issue
Block a user