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

Re: [PATCH 2/2] mergetool: run prompt only if guessed tool

From
Charles Bailey <charles@hashpling.org>
Date
Apr 22, 2014, 06:01 UTC
Message-ID
<20140422060120.GA10198@hashpling.org>
In-Reply-To
<20140422045951.GA60610@gmail.com>
On Mon, Apr 21, 2014 at 09:59:52PM -0700, David Aguilar wrote:
Show 15 quoted lines
> [Cc:ing Charles in case he has an opinion, this behavior dates back to the original MT]
> 
> On Sun, Apr 20, 2014 at 07:17:34PM -0500, Felipe Contreras wrote:
> > It's annoying to see the prompt:
> > 
> >   Hit return to start merge resolution tool (foo):
> > 
> > Every time the user does 'git mergetool' even if the user already
> > configured 'foo' as the wanted tool.
> > 
> > Display this prompt only when the user hasn't explicitly configured a
> > tool.
> 
> I agree this is probably helpful.
> Most users I've met end up configuring mergetool.prompt=false.
>From my memory, the reason that we choose to prompt by default is to
help new users or users who have just changed their choice of mergetool.

Because we never use the exit code of the tool to determine whether a tool "worked", if we don't prompt and the tool fails (bad custom command, requires X when no X available, etc.) then we'll repeatedly run the command for all paths requiring resolution leading to, potentially, a lot of trace with whatever error the tool might happen to report.

We prompt by default to give users a chance to abort the mergetool session at the first opportunity that they see that the configured tool is not working.

Personally, I leave mergetool.prompt unset (default true) because one extra click in a complex merge resolution is relatively low overhead and to catch myself when I forget that I'm in a no-X environment.

I glanced at the patch and it seems to subvert this intent for users who have configured a merge tool. Is my understanding correct?

Previous: David AguilarNext: Felipe Contreras
Message 6 of 19 in “Simple default fixes for v2.0”
  1. 0/2 Simple default fixes for v2.0Felipe Contreras, Apr 21, 2014
  2. 1/2 merge: enable defaulttoupstream by defaultFelipe Contreras, Apr 21, 2014
  3. Junio C HamanoApr 22, 2014
  4. 2/2 mergetool: run prompt only if guessed toolFelipe Contreras, Apr 21, 2014
  5. David AguilarApr 22, 2014
  6. Charles BaileyApr 22, 2014
  7. Felipe ContrerasApr 22, 2014
  8. Charles BaileyApr 22, 2014
  9. Felipe ContrerasApr 22, 2014
  10. Charles BaileyApr 22, 2014
  11. Felipe ContrerasApr 22, 2014
  12. Charles BaileyApr 23, 2014
  13. Junio C HamanoApr 23, 2014
  14. Junio C HamanoApr 24, 2014
  15. Junio C HamanoApr 22, 2014
  16. David AguilarApr 23, 2014
  17. Junio C HamanoApr 23, 2014
  18. Junio C HamanoApr 22, 2014
  19. Junio C HamanoApr 22, 2014

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.