From: Jay Soffian Date: Wed, 18 Feb 2009 13:44:02 +0000 (-0500) Subject: disallow providing multiple upstream branches to rebase, pull --rebase X-Git-Tag: v1.6.2-rc2~24 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=51b2ead03c8cdc0ddeeca2fb5db14b7bac584337;p=git.git disallow providing multiple upstream branches to rebase, pull --rebase It does not make sense to provide multiple upstream branches to either git pull --rebase, or to git rebase, so disallow both. Signed-off-by: Jay Soffian Signed-off-by: Junio C Hamano --- diff --git a/git-pull.sh b/git-pull.sh index 2c7f432dc..25adddfdd 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -171,6 +171,11 @@ case "$merge_head" in echo >&2 "Cannot merge multiple branches into empty head" exit 1 fi + if test true = "$rebase" + then + echo >&2 "Cannot rebase onto multiple branches" + exit 1 + fi ;; esac diff --git a/git-rebase.sh b/git-rebase.sh index 6d3eddbad..368c0ef43 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -310,6 +310,7 @@ do esac shift done +test $# -gt 2 && usage # Make sure we do not have $GIT_DIR/rebase-apply if test -z "$do_merge"