git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mergetools: add support for DeltaWalker

From
Tim Henigan <tim.henigan@gmail.com>
Date
Mar 2, 2012, 13:22 UTC
Message-ID
<CAFouethVURpXFDkm8N=riCQDaOYAXYg3VpwKRFaHMftNWr9=dw@mail.gmail.com>
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:
Show 6 quoted lines
> 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.
Show 8 quoted lines
> 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.
Show 8 quoted lines
>> +       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.
Previous: Junio C Hamano
Message 3 of 3 in “mergetools: add support for DeltaWalker”
  1. mergetools: add support for DeltaWalkerTim Henigan, Mar 2, 2012
  2. Junio C HamanoMar 2, 2012
  3. Tim HeniganMar 2, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.