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

[PATCH] mergetool: export variables for use by custom mergetools

From
David Aguilar <davvid@gmail.com>
Date
May 17, 2008, 20:39 UTC
Message-ID
<8b4e944ac849029f31f403ab75198ed6fb4197c1.1211056369.git.davvid@gmail.com>

The MERGED, BACKUP, LOCAL, REMOTE and BASE variables were not being exported from the git-mergetool.sh script. This prevented custom mergetools from being able to use them.

We now export them so that arbitrary mergetools can easily interact with git mergetool.

This problem was Reported-By: Evgeny <evgeny.zislis@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
---
 git-mergetool.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/git-mergetool.sh b/git-mergetool.sh
index fcdec4a..c4f31ee 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -146,6 +146,12 @@ merge_file () {
     REMOTE="$MERGED.REMOTE.$ext"
     BASE="$MERGED.BASE.$ext"
 
+    export MERGED
+    export BACKUP
+    export LOCAL
+    export REMOTE
+    export BASE
+
     mv -- "$MERGED" "$BACKUP"
     cp -- "$BACKUP" "$MERGED"
 
-- 
1.5.5.1
Next: Charles Bailey
Message 1 of 5 in “mergetool: export variables for use by custom mergetools”
  1. mergetool: export variables for use by custom mergetoolsDavid Aguilar, May 17, 2008
  2. Charles BaileyMay 17, 2008
  3. EvgenyMay 17, 2008
  4. Charles BaileyMay 18, 2008
  5. EvgenyMay 18, 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.