git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] disallow providing multiple upstream branches to rebase, pull --rebase
@ 2009-02-18 13:44 Jay Soffian
  0 siblings, 0 replies; only message in thread
From: Jay Soffian @ 2009-02-18 13:44 UTC (permalink / raw)
  To: git; +Cc: Jay Soffian, Junio C Hamano, Johannes Schindelin

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>
---
This time w/o breaking git rebase $UPSTREAM $BRANCH_TO_SWITCH_TO

 git-pull.sh   |    5 +++++
 git-rebase.sh |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/git-pull.sh b/git-pull.sh
index 2c7f432..25adddf 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 5d9a393..c2a9b1f 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -319,6 +319,7 @@ do
 	esac
 	shift
 done
+test $# -gt 2 && usage
 
 # Make sure we do not have $GIT_DIR/rebase-apply
 if test -z "$do_merge"
-- 
1.6.2.rc1.218.g1b4fab

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-18 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-18 13:44 [PATCH v2] disallow providing multiple upstream branches to rebase, pull --rebase Jay Soffian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).