public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Olivier Croquette <ocroquette@free•fr>
Cc: git@vger•kernel.org, David Aguilar <davvid@gmail•com>
Subject: Re: [PATCH] Copy mergetool "bc3" as "bc4"
Date: Mon, 20 Oct 2014 09:40:05 -0700	[thread overview]
Message-ID: <xmqq7fzu4rve.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1413803017-30489-1-git-send-email-ocroquette@free.fr> (Olivier Croquette's message of "Mon, 20 Oct 2014 13:03:37 +0200")

Olivier Croquette <ocroquette@free•fr> writes:

> Beyond compare 4 is out since september 2014. The CLI interface
> doesn't seem to have changed compared to the version 3.

Hmph, if this is identical to mergetools/bc3, why is the patch even
needed?  Do we auto-detect something and try to use bc4 which does
not exist and fail, and we must supply a copy as bc4 to prevent it?

It may feel somewhat strange to have to say "mergetool --tool=bc3"
when you know what you have is version 4 and not version 3, but in
that case, I wonder if there are reasons why calling both versions
just "bc" is a bad idea.  And assuming that version 5 and later
would keep the same interface, we will not have to worry about that
"I have version 7 why do I have to say 3?" if we can go that route.

Perhaps version 2 and before are unusable as a mergetool backend or
something?

>
> Signed-off-by: Olivier Croquette <ocroquette@free•fr>
> ---
>  mergetools/bc4 |   25 +++++++++++++++++++++++++
>  1 files changed, 25 insertions(+), 0 deletions(-)
>  create mode 100644 mergetools/bc4
>
> diff --git a/mergetools/bc4 b/mergetools/bc4
> new file mode 100644
> index 0000000..b6319d2
> --- /dev/null
> +++ b/mergetools/bc4
> @@ -0,0 +1,25 @@
> +diff_cmd () {
> +	"$merge_tool_path" "$LOCAL" "$REMOTE"
> +}
> +
> +merge_cmd () {
> +	touch "$BACKUP"
> +	if $base_present
> +	then
> +		"$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" \
> +			-mergeoutput="$MERGED"
> +	else
> +		"$merge_tool_path" "$LOCAL" "$REMOTE" \
> +			-mergeoutput="$MERGED"
> +	fi
> +	check_unchanged
> +}
> +
> +translate_merge_tool_path() {
> +	if type bcomp >/dev/null 2>/dev/null
> +	then
> +		echo bcomp
> +	else
> +		echo bcompare
> +	fi
> +}

  reply	other threads:[~2014-10-20 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 11:03 [PATCH] Copy mergetool "bc3" as "bc4" Olivier Croquette
2014-10-20 16:40 ` Junio C Hamano [this message]
2014-10-20 17:32   ` Junio C Hamano
2014-10-20 18:23     ` Sebastian Schuberth
2014-10-20 18:40       ` Junio C Hamano
2014-10-21  8:44         ` David Aguilar
2014-10-21 18:27           ` Junio C Hamano
2014-10-20 20:35     ` Olivier Croquette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7fzu4rve.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=davvid@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=ocroquette@free$(echo .)fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox