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

[PATCH] merge-recursive: Improve the error message printed when merge(1) isn't found.

From
Fredrik Kuivinen <freku045@student.liu.se>
Date
Jan 29, 2006, 12:16 UTC
Message-ID
<20060129121608.GC4815@c165.ib.student.liu.se>
In-Reply-To
<20060129120344.GB4815@c165.ib.student.liu.se>
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
 git-merge-recursive.py |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
75cd8eff434fd6e9cf7fff98f13a27bfaa1b363b
diff --git a/git-merge-recursive.py b/git-merge-recursive.py
index 56c3641..b17c8e5 100755
--- a/git-merge-recursive.py
+++ b/git-merge-recursive.py
@@ -205,11 +205,16 @@ def mergeFile(oPath, oSha, oMode, aPath,
             orig = runProgram(['git-unpack-file', oSha]).rstrip()
             src1 = runProgram(['git-unpack-file', aSha]).rstrip()
             src2 = runProgram(['git-unpack-file', bSha]).rstrip()
-            [out, code] = runProgram(['merge',
-                                      '-L', branch1Name + '/' + aPath,
-                                      '-L', 'orig/' + oPath,
-                                      '-L', branch2Name + '/' + bPath,
-                                      src1, orig, src2], returnCode=True)
+            try:
+                [out, code] = runProgram(['merge',
+                                          '-L', branch1Name + '/' + aPath,
+                                          '-L', 'orig/' + oPath,
+                                          '-L', branch2Name + '/' + bPath,
+                                          src1, orig, src2], returnCode=True)
+            except ProgramError, e:
+                print >>sys.stderr, e
+                die("Failed to execute 'merge'. merge(1) is used as the "
+                    "file-level merge tool. Is 'merge' in your path?")
 
             sha = runProgram(['git-hash-object', '-t', 'blob', '-w',
                               src1]).rstrip()
-- 
0.99.9k.g3480-dirty
Previous: Fredrik KuivinenNext: Roberto Nibali
Message 3 of 8 in “No merge strategy handled the merge (git version 1.1.GIT)”
  1. Roberto NibaliJan 28, 2006
  2. Fredrik KuivinenJan 29, 2006
  3. merge-recursive: Improve the error message printed when merge(1) isn't found.Fredrik Kuivinen, Jan 29, 2006
  4. Roberto NibaliJan 29, 2006
  5. Radoslaw SzkodzinskiJan 29, 2006
  6. Radoslaw SzkodzinskiJan 29, 2006
  7. Roberto NibaliJan 29, 2006
  8. Junio C HamanoJan 29, 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.