summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-13 15:36:31 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-13 15:36:31 -0700
commita1204bd7c3021cbaf1f4f485eb11f2e5a72355b3 (patch)
tree7de327ecd3b3b45ec185ef9639c6bec7f029e4f9 /git-rebase.sh
parent2b533592900ecebeb69e2dd1b70744433700ff2d (diff)
parent0fbb95dc83c80fa12f731e703e88e61d9391abd5 (diff)
downloadgit-a1204bd7c3021cbaf1f4f485eb11f2e5a72355b3.tar.gz
Merge branch 'mz/rebase-no-mbox'
Teach "am --rebasing" codepath to grab authorship, log message and the patch text directly out of existing commits. This will help rebasing commits that have confusing "diff" output in their log messages. * mz/rebase-no-mbox: am: don't call mailinfo if $rebasing am --rebasing: get patch body from commit, not from mailbox rebase --root: print usage on too many args rebase: don't source git-sh-setup twice
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 6bd8eae648..5bddfa9690 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -414,6 +414,7 @@ else
test -z "$onto" && die "You must specify --onto when using --root"
unset upstream_name
unset upstream
+ test $# -gt 1 && usage
upstream_arg=--root
fi
@@ -464,7 +465,7 @@ case "$#" in
die "fatal: no such branch: $1"
fi
;;
-*)
+0)
# Do not need to switch branches, we are already on it.
if branch_name=`git symbolic-ref -q HEAD`
then
@@ -476,6 +477,9 @@ case "$#" in
fi
orig_head=$(git rev-parse --verify "${branch_name}^0") || exit
;;
+*)
+ die "BUG: unexpected number of arguments left to parse"
+ ;;
esac
require_clean_work_tree "rebase" "Please commit or stash them."