]> git.ipfire.org Git - thirdparty/git.git/commitdiff
disallow providing multiple upstream branches to rebase, pull --rebase
authorJay Soffian <jaysoffian@gmail.com>
Wed, 18 Feb 2009 13:44:02 +0000 (08:44 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Feb 2009 19:14:04 +0000 (11:14 -0800)
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 <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-pull.sh
git-rebase.sh

index 2c7f432dc04254dcb9906f4d078eb16d195848ca..25adddfddfc0a7e2cc33ea0dc1e1d7a101514972 100755 (executable)
@@ -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
 
index 6d3eddbada5e1a5a38e2b909c75909b8e9d5fda8..368c0ef4342df990a5617fd6fbe2cd973b1b208b 100755 (executable)
@@ -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"