git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] disallow providing multiple upstream branches to rebase, pull --rebase

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 18, 2009, 04:44 UTC
Message-ID
<1234932262-63469-1-git-send-email-jaysoffian@gmail.com>

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>
---
 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..ffb6027 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -319,6 +319,7 @@ do
 	esac
 	shift
 done
+test $# -gt 1 && usage
 
 # Make sure we do not have $GIT_DIR/rebase-apply
 if test -z "$do_merge"
-- 
1.6.2.rc1.210.g159a
Next: Johannes Schindelin
Message 1 of 6 in “disallow providing multiple upstream branches to rebase, pull --rebase”
  1. disallow providing multiple upstream branches to rebase, pull --rebaseJay Soffian, Feb 18, 2009
  2. Johannes SchindelinFeb 18, 2009
  3. Jay SoffianFeb 18, 2009
  4. Johannes SchindelinFeb 18, 2009
  5. Jay SoffianFeb 18, 2009
  6. Johannes SchindelinFeb 18, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.