Web lists-archives.com

Re: [PATCH (Apple Git) 08/13] git mergetool/difftool doesn't list 'opendiff' as an available tool on 10.8




Hi Jeremy,

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

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

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)
> 
>