aboutsummaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorfreku045@student.liu.se <freku045@student.liu.se>2005-12-13 23:30:32 +0100
committerJunio C Hamano <junkio@cox.net>2005-12-14 02:53:44 -0800
commit3ae39ab232a103c2a4284a6701be62d95f0d0987 (patch)
tree2c6e529b4d874f77ce34619cf591ec7e00754adf /git-rebase.sh
parent7ab099d220e5bbb5c6385c1beb5e70bbed930b4b (diff)
downloadgit-3ae39ab232a103c2a4284a6701be62d95f0d0987.tar.gz
git-3ae39ab232a103c2a4284a6701be62d95f0d0987.tar.xz
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>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 638ff0dbc..8a5f44aa5 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -3,6 +3,7 @@
# Copyright (c) 2005 Junio C Hamano.
#
+USAGE='<upstream> [<head>]'
. 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