@matheusbsbs / matheus-bagliano / commits / 384770a5e7
Fork 0

contrib/difftool: add support for Kompare

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Acked-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Markus Heidelberg committed Jan 31, 2009 at 00:19 UTC 384770a5e79938b6a7633c5996597ef3211e4a7c
2 files changed +12 -7
contrib/difftool/git-difftool-helper
+10 -6
@@ -1,7 +1,7 @@
1 #!/bin/sh
2 # git-difftool-helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
3 -# It supports kdiff3, tkdiff, xxdiff, meld, opendiff, emerge, ecmerge,
4 -# vimdiff, gvimdiff, and custom user-configurable tools.
3 +# It supports kdiff3, kompare, tkdiff, xxdiff, meld, opendiff,
4 +# emerge, ecmerge, vimdiff, gvimdiff, and custom user-configurable tools.
5 # This script is typically launched by using the 'git difftool'
6 # convenience command.
7 #
@@ -73,6 +73,10 @@ launch_merge_tool () {
73 > /dev/null 2>&1
74 ;;
75
76 + kompare)
77 + "$merge_tool_path" "$LOCAL" "$REMOTE"
78 + ;;
79 +
80 tkdiff)
81 "$merge_tool_path" -o "$MERGED" "$LOCAL" "$REMOTE"
82 ;;
@@ -134,7 +138,7 @@ valid_custom_tool() {
138 # Built-in merge tools are always valid.
139 valid_tool() {
140 case "$1" in
137 - kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)
141 + kdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)
142 ;; # happy
143 *)
144 if ! valid_custom_tool "$1"
@@ -180,14 +184,14 @@ if test -z "$merge_tool"; then
184
185 # We have a $DISPLAY so try some common UNIX merge tools
186 if test -n "$DISPLAY"; then
183 - merge_tool_candidates="kdiff3 tkdiff xxdiff meld gvimdiff"
187 + merge_tool_candidates="kdiff3 kompare tkdiff xxdiff meld gvimdiff"
188 # If gnome then prefer meld
189 if test -n "$GNOME_DESKTOP_SESSION_ID"; then
190 merge_tool_candidates="meld $merge_tool_candidates"
191 fi
188 - # If KDE then prefer kdiff3
192 + # If KDE then prefer kdiff3 or kompare
193 if test "$KDE_FULL_SESSION" = "true"; then
190 - merge_tool_candidates="kdiff3 $merge_tool_candidates"
194 + merge_tool_candidates="kdiff3 kompare $merge_tool_candidates"
195 fi
196 fi
197
contrib/difftool/git-difftool.txt
+2 -1
@@ -28,7 +28,8 @@ OPTIONS
28 --tool=<tool>::
29 Use the merge resolution program specified by <tool>.
30 Valid merge tools are:
31 - kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff
31 + kdiff3, kompare, tkdiff, meld, xxdiff, emerge,
32 + vimdiff, gvimdiff, ecmerge, and opendiff
33 +
34 If a merge resolution program is not specified, 'git-difftool'
35 will use the configuration variable `merge.tool`. If the