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

[PATCH 3/3] rebase: error out for NO_PYTHON if they use recursive merge

From
EWEric Wong <normalperson@yhbt.net>
Date
Jun 21, 2006, 10:04 UTC
Message-ID
<11508842853098-git-send-email-normalperson@yhbt.net>
In-Reply-To
<11508842842125-git-send-email-normalperson@yhbt.net>

recursive merge relies on Python, and we can't perform rename-aware merges without the recursive merge. So bail out before trying it.

The test won't work w/o recursive merge, either, so skip that, too.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-rebase.sh           |    9 +++++++++
 t/t3402-rebase-merge.sh |    6 ++++++
 2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index bce7bf8..b9ce112 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -300,6 +300,15 @@ then
 	exit $?
 fi
 
+if test "@@NO_PYTHON@@" && test "$strategy" = "recursive"
+then
+	die 'The recursive merge strategy currently relies on Python,
+which this installation of git was not configured with.  Please consider
+a different merge strategy (e.g. octopus, resolve, stupid, ours)
+or install Python and git with Python support.'
+
+fi
+
 # start doing a rebase with git-merge
 # this is rename-aware if the recursive (default) strategy is used
 
diff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh
index 8c7a519..f1c1f35 100755
--- a/t/t3402-rebase-merge.sh
+++ b/t/t3402-rebase-merge.sh
@@ -7,6 +7,12 @@ test_description='git rebase --merge tes
 
 . ./test-lib.sh
 
+if test "$no_python"; then
+	echo "Skipping: no python => no recursive merge"
+	test_done
+	exit 0
+fi
+
 T="A quick brown fox
 jumps over the lazy dog."
 for i in 1 2 3 4 5 6 7 8 9 10
-- 
1.4.0.g65f3
Previous: Eric WongNext: Junio C Hamano
Message 8 of 11 in “rebase: Allow merge strategies to be used when rebasing”
  1. rebase: Allow merge strategies to be used when rebasingEric Wong, Jun 18, 2006
  2. Junio C HamanoJun 18, 2006
  3. Eric WongJun 19, 2006
  4. Junio C HamanoJun 19, 2006
  5. Eric WongJun 21, 2006
  6. rebase: Allow merge strategies to be used when rebasingEric Wong, Jun 21, 2006
  7. 1/3 rebase: Allow merge strategies to be used when rebasingEric Wong, Jun 21, 2006
  8. 3/3 rebase: error out for NO_PYTHON if they use recursive mergeEric Wong, Jun 21, 2006
  9. Junio C HamanoJun 21, 2006
  10. Junio C HamanoJun 21, 2006
  11. Add renaming-rebase test.Junio C Hamano, Jun 18, 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.