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

Re: Git rebase/pull questions

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 16, 2008, 11:50 UTC
Message-ID
<alpine.LSU.1.00.0802161147470.30505@racer.site>
In-Reply-To
<76718490802152010udd11567v25ae456db0a59f3b@mail.gmail.com>
Hi,
On Fri, 15 Feb 2008, Jay Soffian wrote:
> Second, git-pull completely ignores -s/--strategy if also give --rebase, 
> but I wonder if it shouldn't just pass the strategy along to git-rebase.

That is just an oversight. Could you test if this works for you (completely untested by me...)?

-- snip -- [PATCH] pull --rebase: respect merge strategy options

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git-pull.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index 46da0f4..e0bf582 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -174,6 +174,7 @@ fi
 
 merge_name=$(git fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") || exit
 test true = "$rebase" &&
-	exec git-rebase --onto $merge_head ${oldremoteref:-$merge_head}
+	exec git-rebase $strategy_args \
+		--onto $merge_head ${oldremoteref:-$merge_head}
 exec git-merge $no_summary $no_commit $squash $no_ff $strategy_args \
 	"$merge_name" HEAD $merge_head
-- snap --

Ciao,
Dscho
Previous: Jay Soffian
Message 2 of 2 in “Git rebase/pull questions”
  1. Jay SoffianFeb 16, 2008
  2. Johannes SchindelinFeb 16, 2008

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.