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 <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jay Soffian 2009-02-18 08:44:02 -05:00 committed by Junio C Hamano
parent b94ead7594
commit 51b2ead03c
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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"