* [PATCH] contrib/difftool: add support for Kompare
@ 2009-01-30 23:19 Markus Heidelberg
2009-01-31 6:37 ` David Aguilar
0 siblings, 1 reply; 3+ messages in thread
From: Markus Heidelberg @ 2009-01-30 23:19 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
contrib/difftool/git-difftool-helper | 16 ++++++++++------
contrib/difftool/git-difftool.txt | 3 ++-
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/contrib/difftool/git-difftool-helper b/contrib/difftool/git-difftool-helper
index 0c48506..10632a3 100755
--- a/contrib/difftool/git-difftool-helper
+++ b/contrib/difftool/git-difftool-helper
@@ -1,7 +1,7 @@
#!/bin/sh
# git-difftool-helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
-# It supports kdiff3, tkdiff, xxdiff, meld, opendiff, emerge, ecmerge,
-# vimdiff, gvimdiff, and custom user-configurable tools.
+# It supports kdiff3, kompare, tkdiff, xxdiff, meld, opendiff,
+# emerge, ecmerge, vimdiff, gvimdiff, and custom user-configurable tools.
# This script is typically launched by using the 'git difftool'
# convenience command.
#
@@ -73,6 +73,10 @@ launch_merge_tool () {
> /dev/null 2>&1
;;
+ kompare)
+ "$merge_tool_path" "$LOCAL" "$REMOTE"
+ ;;
+
tkdiff)
"$merge_tool_path" -o "$MERGED" "$LOCAL" "$REMOTE"
;;
@@ -134,7 +138,7 @@ valid_custom_tool() {
# Built-in merge tools are always valid.
valid_tool() {
case "$1" in
- kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)
+ kdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)
;; # happy
*)
if ! valid_custom_tool "$1"
@@ -180,14 +184,14 @@ if test -z "$merge_tool"; then
# We have a $DISPLAY so try some common UNIX merge tools
if test -n "$DISPLAY"; then
- merge_tool_candidates="kdiff3 tkdiff xxdiff meld gvimdiff"
+ merge_tool_candidates="kdiff3 kompare tkdiff xxdiff meld gvimdiff"
# If gnome then prefer meld
if test -n "$GNOME_DESKTOP_SESSION_ID"; then
merge_tool_candidates="meld $merge_tool_candidates"
fi
- # If KDE then prefer kdiff3
+ # If KDE then prefer kdiff3 or kompare
if test "$KDE_FULL_SESSION" = "true"; then
- merge_tool_candidates="kdiff3 $merge_tool_candidates"
+ merge_tool_candidates="kdiff3 kompare $merge_tool_candidates"
fi
fi
diff --git a/contrib/difftool/git-difftool.txt b/contrib/difftool/git-difftool.txt
index ca3dbd2..6e2610c 100644
--- a/contrib/difftool/git-difftool.txt
+++ b/contrib/difftool/git-difftool.txt
@@ -28,7 +28,8 @@ OPTIONS
--tool=<tool>::
Use the merge resolution program specified by <tool>.
Valid merge tools are:
- kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff
+ kdiff3, kompare, tkdiff, meld, xxdiff, emerge,
+ vimdiff, gvimdiff, ecmerge, and opendiff
+
If a merge resolution program is not specified, 'git-difftool'
will use the configuration variable `merge.tool`. If the
--
1.6.1.2.256.g62566b
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] contrib/difftool: add support for Kompare
2009-01-30 23:19 [PATCH] contrib/difftool: add support for Kompare Markus Heidelberg
@ 2009-01-31 6:37 ` David Aguilar
2009-01-31 10:41 ` Markus Heidelberg
0 siblings, 1 reply; 3+ messages in thread
From: David Aguilar @ 2009-01-31 6:37 UTC (permalink / raw)
To: Markus Heidelberg; +Cc: Junio C Hamano, git
On 0, Markus Heidelberg <markus.heidelberg@web.de> wrote:
>
> Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
> ---
> contrib/difftool/git-difftool-helper | 16 ++++++++++------
> contrib/difftool/git-difftool.txt | 3 ++-
> 2 files changed, 12 insertions(+), 7 deletions(-)
Good stuff =)
Should we patch mergetool with the same change?
Kompare's pretty popular in KDE land.
BTW git.git's next branch has:
commit fb700cb0679e22900f0d1435641e6cf7c652968b
Author: Johannes Gilger <heipei@hackvalue.de>
Date: Sat Jan 24 00:12:45 2009 +0100
mergetool: Don't repeat merge tool candidates
git mergetool listed some candidates for mergetools twice, depending on
the environment.
This slightly changes the behavior when both KDE_FULL_SESSION and
GNOME_DESKTOP_SESSION_ID are set at the same time; in such a case
meld is used in favor of kdiff3 (the old code favored kdiff3 in such a
case), but it should not matter in practice.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
difftool probably needs a similar patch.
I'll see if I can get to that this weekend if no one beats
me to it.
>
> diff --git a/contrib/difftool/git-difftool-helper b/contrib/difftool/git-difftool-helper
> index 0c48506..10632a3 100755
> --- a/contrib/difftool/git-difftool-helper
> +++ b/contrib/difftool/git-difftool-helper
> @@ -1,7 +1,7 @@
> #!/bin/sh
> # git-difftool-helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
> -# It supports kdiff3, tkdiff, xxdiff, meld, opendiff, emerge, ecmerge,
> -# vimdiff, gvimdiff, and custom user-configurable tools.
> +# It supports kdiff3, kompare, tkdiff, xxdiff, meld, opendiff,
> +# emerge, ecmerge, vimdiff, gvimdiff, and custom user-configurable tools.
> # This script is typically launched by using the 'git difftool'
> # convenience command.
> #
> @@ -73,6 +73,10 @@ launch_merge_tool () {
> > /dev/null 2>&1
> ;;
>
> + kompare)
> + "$merge_tool_path" "$LOCAL" "$REMOTE"
> + ;;
> +
> tkdiff)
> "$merge_tool_path" -o "$MERGED" "$LOCAL" "$REMOTE"
> ;;
> @@ -134,7 +138,7 @@ valid_custom_tool() {
> # Built-in merge tools are always valid.
> valid_tool() {
> case "$1" in
> - kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)
> + kdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)
> ;; # happy
> *)
> if ! valid_custom_tool "$1"
> @@ -180,14 +184,14 @@ if test -z "$merge_tool"; then
>
> # We have a $DISPLAY so try some common UNIX merge tools
> if test -n "$DISPLAY"; then
> - merge_tool_candidates="kdiff3 tkdiff xxdiff meld gvimdiff"
> + merge_tool_candidates="kdiff3 kompare tkdiff xxdiff meld gvimdiff"
> # If gnome then prefer meld
> if test -n "$GNOME_DESKTOP_SESSION_ID"; then
> merge_tool_candidates="meld $merge_tool_candidates"
> fi
> - # If KDE then prefer kdiff3
> + # If KDE then prefer kdiff3 or kompare
> if test "$KDE_FULL_SESSION" = "true"; then
> - merge_tool_candidates="kdiff3 $merge_tool_candidates"
> + merge_tool_candidates="kdiff3 kompare $merge_tool_candidates"
> fi
> fi
>
> diff --git a/contrib/difftool/git-difftool.txt b/contrib/difftool/git-difftool.txt
> index ca3dbd2..6e2610c 100644
> --- a/contrib/difftool/git-difftool.txt
> +++ b/contrib/difftool/git-difftool.txt
> @@ -28,7 +28,8 @@ OPTIONS
> --tool=<tool>::
> Use the merge resolution program specified by <tool>.
> Valid merge tools are:
> - kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff
> + kdiff3, kompare, tkdiff, meld, xxdiff, emerge,
> + vimdiff, gvimdiff, ecmerge, and opendiff
> +
> If a merge resolution program is not specified, 'git-difftool'
> will use the configuration variable `merge.tool`. If the
> --
> 1.6.1.2.256.g62566b
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] contrib/difftool: add support for Kompare
2009-01-31 6:37 ` David Aguilar
@ 2009-01-31 10:41 ` Markus Heidelberg
0 siblings, 0 replies; 3+ messages in thread
From: Markus Heidelberg @ 2009-01-31 10:41 UTC (permalink / raw)
To: David Aguilar; +Cc: Junio C Hamano, git
David Aguilar, 31.01.2009:
> On 0, Markus Heidelberg <markus.heidelberg@web.de> wrote:
> >
> > Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
> > ---
> > contrib/difftool/git-difftool-helper | 16 ++++++++++------
> > contrib/difftool/git-difftool.txt | 3 ++-
> > 2 files changed, 12 insertions(+), 7 deletions(-)
>
>
> Good stuff =)
> Should we patch mergetool with the same change?
> Kompare's pretty popular in KDE land.
But Kompare cannot merge. It is kind of a diff/patch frontend, it takes
only one or two files (or directories) as arguments.
> BTW git.git's next branch has:
>
> commit fb700cb0679e22900f0d1435641e6cf7c652968b
> Author: Johannes Gilger <heipei@hackvalue.de>
> Date: Sat Jan 24 00:12:45 2009 +0100
>
> mergetool: Don't repeat merge tool candidates
>
> git mergetool listed some candidates for mergetools twice, depending on
> the environment.
>
> This slightly changes the behavior when both KDE_FULL_SESSION and
> GNOME_DESKTOP_SESSION_ID are set at the same time; in such a case
> meld is used in favor of kdiff3 (the old code favored kdiff3 in such a
> case), but it should not matter in practice.
>
> Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
>
>
> difftool probably needs a similar patch.
> I'll see if I can get to that this weekend if no one beats
> me to it.
Yes, the change would make sense here, too.
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-31 10:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-30 23:19 [PATCH] contrib/difftool: add support for Kompare Markus Heidelberg
2009-01-31 6:37 ` David Aguilar
2009-01-31 10:41 ` Markus Heidelberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).