* [PATCH] Use resolve in git-pull if NO_PYTHON
@ 2006-03-14 17:16 Mark Hollomon
2006-03-14 17:26 ` Johannes Schindelin
0 siblings, 1 reply; 2+ messages in thread
From: Mark Hollomon @ 2006-03-14 17:16 UTC (permalink / raw)
To: git
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Use resolve in git-pull if NO_PYTHON
2006-03-14 17:16 [PATCH] Use resolve in git-pull if NO_PYTHON Mark Hollomon
@ 2006-03-14 17:26 ` Johannes Schindelin
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2006-03-14 17:26 UTC (permalink / raw)
To: Mark Hollomon; +Cc: git
Hi,
On Tue, 14 Mar 2006, Mark Hollomon wrote:
> 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.
D'oh. I forgot to send that patch when I was doing the NO_PYTHON stuff.
But I did it differently: There is no good reason that git-pull should
insist on its own default strategy when git-merge already has one.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-14 17:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-14 17:16 [PATCH] Use resolve in git-pull if NO_PYTHON Mark Hollomon
2006-03-14 17:26 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox