difftool/mergetool: add diffuse as merge and diff tool
This adds diffuse as a built-in merge tool. Signed-off-by: Sebastian Pipping <sebastian@pipping.org> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sebastian Pipping committed
Apr 6, 2009 at 01:31 UTC
1c0f3d224eff2ff8ca8442811edb5a6830adba1a
6 files changed
+14
-11
Documentation/git-mergetool.txt
+1
-1
@@ -27,7 +27,7 @@ OPTIONS
27
Use the merge resolution program specified by <tool>.
28
Valid merge tools are:
29
kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,
30
- tortoisemerge and opendiff
30
+ diffuse, tortoisemerge and opendiff
31
+
32
If a merge resolution program is not specified, 'git-mergetool'
33
will use the configuration variable `merge.tool`. If the
Documentation/merge-config.txt
+1
-1
@@ -23,7 +23,7 @@ merge.tool::
23
Controls which merge resolution program is used by
24
linkgit:git-mergetool[1]. Valid built-in values are: "kdiff3",
25
"tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff",
26
- "ecmerge", tortoisemerge and
26
+ "diffuse", "ecmerge", "tortoisemerge", and
27
"opendiff". Any other value is treated is custom merge tool
28
and there must be a corresponding mergetool.<tool>.cmd option.
29
contrib/completion/git-completion.bash
+2
-1
@@ -1174,7 +1174,8 @@ _git_mergetool ()
1174
--tool=*)
1175
__gitcomp "
1176
kdiff3 tkdiff meld xxdiff emerge
1177
- vimdiff gvimdiff ecmerge opendiff
1177
+ vimdiff gvimdiff ecmerge diffuse
1178
+ opendiff
1179
" "" "${cur##--tool=}"
1180
return
1181
;;
contrib/difftool/git-difftool-helper
+6
-4
@@ -1,7 +1,5 @@
1
#!/bin/sh
2
# git-difftool-helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
3
-# It supports kdiff3, kompare, tkdiff, xxdiff, meld, opendiff,
4
-# emerge, ecmerge, vimdiff, gvimdiff, and custom user-configurable tools.
3
# This script is typically launched by using the 'git difftool'
4
# convenience command.
5
#
@@ -55,6 +53,10 @@ launch_merge_tool () {
53
"$merge_tool_path" "$LOCAL" "$REMOTE"
54
;;
55
56
+ diffuse)
57
+ "$merge_tool_path" "$LOCAL" "$REMOTE" | cat
58
+ ;;
59
+
60
vimdiff)
61
"$merge_tool_path" -d -c "wincmd l" "$LOCAL" "$REMOTE"
62
;;
@@ -164,9 +166,9 @@ if test -z "$merge_tool"; then
166
if test -n "$DISPLAY"; then
167
# If gnome then prefer meld, otherwise, prefer kdiff3 or kompare
168
if test -n "$GNOME_DESKTOP_SESSION_ID" ; then
167
- merge_tool_candidates="meld kdiff3 kompare tkdiff xxdiff gvimdiff"
169
+ merge_tool_candidates="meld kdiff3 kompare tkdiff xxdiff gvimdiff diffuse"
170
else
169
- merge_tool_candidates="kdiff3 kompare tkdiff xxdiff meld gvimdiff"
171
+ merge_tool_candidates="kdiff3 kompare tkdiff xxdiff meld gvimdiff diffuse"
172
fi
173
fi
174
if echo "${VISUAL:-$EDITOR}" | grep 'emacs' > /dev/null 2>&1; then
contrib/difftool/git-difftool.txt
+2
-2
@@ -25,8 +25,8 @@ OPTIONS
25
--tool=<tool>::
26
Use the diff tool specified by <tool>.
27
Valid merge tools are:
28
- kdiff3, kompare, tkdiff, meld, xxdiff, emerge,
29
- vimdiff, gvimdiff, ecmerge, and opendiff
28
+ kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,
29
+ ecmerge, diffuse and opendiff
30
+
31
If a diff tool is not specified, 'git-difftool'
32
will use the configuration variable `diff.tool`. If the
git-mergetool.sh
+2
-2
@@ -414,9 +414,9 @@ fi
414
if test -z "$merge_tool" ; then
415
if test -n "$DISPLAY"; then
416
if test -n "$GNOME_DESKTOP_SESSION_ID" ; then
417
- merge_tool_candidates="meld kdiff3 tkdiff xxdiff tortoisemerge gvimdiff"
417
+ merge_tool_candidates="meld kdiff3 tkdiff xxdiff tortoisemerge gvimdiff diffuse"
418
else
419
- merge_tool_candidates="kdiff3 tkdiff xxdiff meld tortoisemerge gvimdiff"
419
+ merge_tool_candidates="kdiff3 tkdiff xxdiff meld tortoisemerge gvimdiff diffuse"
420
fi
421
fi
422
if echo "${VISUAL:-$EDITOR}" | grep 'emacs' > /dev/null 2>&1; then