Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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>
  • Loading branch information...
commit 51b2ead03c8cdc0ddeeca2fb5db14b7bac584337 1 parent b94ead7
@jaysoffian jaysoffian authored gitster committed
Showing with 6 additions and 0 deletions.
  1. +5 −0 git-pull.sh
  2. +1 −0  git-rebase.sh
View
5 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
View
1  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"
Please sign in to comment.
Something went wrong with that request. Please try again.