Skip to content

Commit

Permalink
disallow providing multiple upstream branches to rebase, pull --rebase
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jay Soffian authored and Junio C Hamano committed Feb 18, 2009
1 parent b94ead7 commit 51b2ead
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions git-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions git-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 51b2ead

Please sign in to comment.