git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Henigan <tim.henigan@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, davvid@gmail.com
Subject: Re: [PATCH] mergetools: add support for DeltaWalker
Date: Fri, 2 Mar 2012 08:22:09 -0500	[thread overview]
Message-ID: <CAFouethVURpXFDkm8N=riCQDaOYAXYg3VpwKRFaHMftNWr9=dw@mail.gmail.com> (raw)
In-Reply-To: <7vpqcvk496.fsf@alter.siamese.dyndns.org>

On Thu, Mar 1, 2012 at 11:37 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Tim Henigan <tim.henigan@gmail.com> writes:
>
> I see that the earlier refactoring to make mergetool backend pluggable is
> starting to pay off rather nicely.  It is not "since ..., requires ...",
> but "thanks to ..., adding a random new tool is just a matter of dropping
> a trivial shell snippet in the directory".

I will reword the commit message in v2.


> Perhaps doing the above like this might make it a bit less of an eye-sore.
>
>        if $base_present
>        then
>                "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" -merged="$PWD/$MERGED"
>        else
>                "$merge_tool_path" "$LOCAL" "$REMOTE" -merged="$PWD/$MERGED"
>        fi >/dev/null 2>&1

Will update in v2.


>> +       status=$?
>
> This is highly dubious.  Looking at existing mergetools/*, I think the
> caller expects merge_cmd to signal success or failure with $?, so you
> probably just want to drop this line; the caller will then get the $?
> that was set by the "$merge_tool_path" command.
>
> That is how your diff_cmd is communicating with its caller after all, no?

It seems that only two of the existing scripts use this 'status=$?'
line (emerge and kdiff3).  I used the 'kdiff3' file as my starting
point without actually trying to understand why that line was present.
 Local testing shows that I don't need this line for DeltaWalker, so
it will be removed in v2.

      reply	other threads:[~2012-03-02 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02  1:47 [PATCH] mergetools: add support for DeltaWalker Tim Henigan
2012-03-02  4:37 ` Junio C Hamano
2012-03-02 13:22   ` Tim Henigan [this message]

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='CAFouethVURpXFDkm8N=riCQDaOYAXYg3VpwKRFaHMftNWr9=dw@mail.gmail.com' \
    --to=tim.henigan@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).