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

[PATCH 1/2] mergetool: refactored kdiff3 -> KDIFF3

From
Steffen Prohaska <prohaska@zib.de>
Date
Aug 10, 2007, 23:56 UTC
Message-ID
<11867901612954-git-send-email-prohaska@zib.de>

Use shell variable KDIFF3 instead of kdiff3 to call kdiff3. This will be used in detection of the absolute absolute path.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 git-mergetool.sh |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

This change is needed to be able to provide an absolute path to kdiff3, which will be looked up in the Windows Registry. See the following patch.

diff --git a/git-mergetool.sh b/git-mergetool.sh
index e6bbb6b..90a69b3 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -13,6 +13,8 @@ SUBDIRECTORY_OK=Yes
 . git-sh-setup
 require_work_tree
 
+KDIFF3=kdiff3
+
 # Returns true if the mode reflects a symlink
 is_symlink () {
     test "$1" = 120000
@@ -191,10 +193,10 @@ merge_file () {
     case "$merge_tool" in
 	kdiff3)
 	    if base_present ; then
-		(kdiff3 --auto --L1 "$path (Base)" -L2 "$path (Local)" --L3 "$path (Remote)" \
+		("$KDIFF3" --auto --L1 "$path (Base)" -L2 "$path (Local)" --L3 "$path (Remote)" \
 		    -o "$path" -- "$BASE" "$LOCAL" "$REMOTE" > /dev/null 2>&1)
 	    else
-		(kdiff3 --auto -L1 "$path (Local)" --L2 "$path (Remote)" \
+		("$KDIFF3" --auto -L1 "$path (Local)" --L2 "$path (Remote)" \
 		    -o "$path" -- "$LOCAL" "$REMOTE" > /dev/null 2>&1)
 	    fi
 	    status=$?
-- 
1.5.3.rc4.744.g68381
Next: Steffen Prohaska
Message 1 of 2 in “mergetool: refactored kdiff3 -> KDIFF3”
  1. 1/2 mergetool: refactored kdiff3 -> KDIFF3Steffen Prohaska, Aug 10, 2007
  2. mergetool: added support for kdiff3 on windowsSteffen Prohaska, Aug 10, 2007

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.