[(Apple,Git),08/13] git mergetool/difftool doesn't list 'opendiff' as an available tool on 10.8
diff mbox series

Message ID 20190129193818.8645-9-jeremyhu@apple.com
State New
Headers show
Series
  • Differences between git-2.20.1 and Apple Git-116
Related show

Commit Message

Jeremy Sequoia Jan. 29, 2019, 7:38 p.m. UTC
See <rdar://problem/12652310>

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
---
 git-mergetool--lib.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Johannes Schindelin Jan. 30, 2019, 7:07 p.m. UTC | #1
Hi Jeremy,

On Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:

> See <rdar://problem/12652310>
> 
> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

You know yourself how to improve this commit message rather dramatically.

> ---
>  git-mergetool--lib.sh | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
> index 83bf52494c..f85be7406f 100644
> --- a/git-mergetool--lib.sh
> +++ b/git-mergetool--lib.sh
> @@ -273,9 +273,9 @@ list_merge_tool_candidates () {
>  	then
>  		if test -n "$GNOME_DESKTOP_SESSION_ID"
>  		then
> -			tools="meld opendiff kdiff3 tkdiff xxdiff $tools"
> +			tools="meld kdiff3 tkdiff xxdiff $tools"
>  		else
> -			tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
> +			tools="kdiff3 tkdiff xxdiff meld $tools"
>  		fi
>  		tools="$tools gvimdiff diffuse diffmerge ecmerge"
>  		tools="$tools p4merge araxis bc codecompare"
> @@ -288,6 +288,8 @@ list_merge_tool_candidates () {
>  		tools="$tools emerge vimdiff"
>  		;;
>  	esac
> +
> +	tools="opendiff $tools"

That is a hack, not a solution.

A much better idea would be to leave the `DISPLAY` block alone and to add
an `elif test -x /path/to/known/location` block.

Ciao,
Johannes

>  }
>  
>  show_tool_help () {
> -- 
> 2.20.0 (Apple Git-115)
> 
>

Patch
diff mbox series

diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 83bf52494c..f85be7406f 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -273,9 +273,9 @@  list_merge_tool_candidates () {
 	then
 		if test -n "$GNOME_DESKTOP_SESSION_ID"
 		then
-			tools="meld opendiff kdiff3 tkdiff xxdiff $tools"
+			tools="meld kdiff3 tkdiff xxdiff $tools"
 		else
-			tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
+			tools="kdiff3 tkdiff xxdiff meld $tools"
 		fi
 		tools="$tools gvimdiff diffuse diffmerge ecmerge"
 		tools="$tools p4merge araxis bc codecompare"
@@ -288,6 +288,8 @@  list_merge_tool_candidates () {
 		tools="$tools emerge vimdiff"
 		;;
 	esac
+
+	tools="opendiff $tools"
 }
 
 show_tool_help () {