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

[PATCH] Use resolve in git-pull if NO_PYTHON

From
MHMark Hollomon <markhollomon@comcast.net>
Date
Mar 14, 2006, 17:16 UTC
Message-ID
<1142356355-4772-markhollomon@comcast.net>

git-pull is hardcoded to use the recursive merge strategy for the twohead case. But if git has been built with NO_PYTHON, that strategy is not available. Teach git-pull to use resolve if built with NO_PYTHON.

Signed-off-by: Mark Hollomon <markhollomon@comcast.net>
---
 git-pull.sh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
1eb3abec6f4811e3eeafa50445ed0f2ce5d85b08
diff --git a/git-pull.sh b/git-pull.sh
index 6caf1aa..ae9c346 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -8,6 +8,11 @@ USAGE='[-n | --no-summary] [--no-commit]
 LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.'
 . git-sh-setup
 
+default_twohead_strategy='recursive'
+if test "@@NO_PYTHON@@"; then
+    default_twohead_strategy='resolve'
+fi
+
 strategy_args= no_summary= no_commit=
 while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac
 do
@@ -82,7 +87,7 @@ case "$merge_head" in
 	var=`git repo-config --get pull.twohead`
 	if test '' = "$var"
 	then
-		strategy_default_args='-s recursive'
+		strategy_default_args="-s $default_twohead_strategy"
 	else
 		strategy_default_args="-s $var"
 	fi
-- 
1.2.4.g967a
Next: Johannes Schindelin
Message 1 of 2 in “Use resolve in git-pull if NO_PYTHON”
  1. Use resolve in git-pull if NO_PYTHONMark Hollomon, Mar 14, 2006
  2. Johannes SchindelinMar 14, 2006

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.