From 20e93f53e3a220018c62e0055a083af6079b8a2c Mon Sep 17 00:00:00 2001 From: Johannes Schmidt-Ehrenberg Date: Mon, 13 Aug 2007 19:00:39 +0200 Subject: [PATCH] mergetool: fixed parsing of registry entry for kdiff3 The old code failed on Windows Vista. The output of reg.exe or something else may be a bit different. This patch improves the parsing code to be more robust. Signed-off-by: Steffen Prohaska --- git-mergetool.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-mergetool.sh b/git-mergetool.sh index e7d745062b..54f6d58a84 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -323,7 +323,7 @@ if test -z "$merge_tool" ; then fi fi regentry="$(REG QUERY 'HKEY_LOCAL_MACHINE\SOFTWARE\KDiff3\diff-ext' 2>/dev/null)" && { - KDIFF3=$(echo "$regentry" | grep diffcommand | cut -f 3 | sed -e 's@\\@/@g') + KDIFF3=$(echo "$regentry" | grep diffcommand | awk -F 'REG_SZ' '{ print $2 }' | sed -e 's/^ *//'| sed -e 's@\\@/@g') KDIFF3SEPARATOR= merge_tool_candidates="$merge_tool_candidates kdiff3" }