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:55 UTC
Message-ID
<20140422065549.GA11224@hashpling.org>
In-Reply-To
<53560b09bbe96_2400128531085@nysa.notmuch>
On Tue, Apr 22, 2014 at 01:24:09AM -0500, Felipe Contreras wrote:
Show 5 quoted lines
> 
> This is what I get when a tool is not working:
> 
>   Documentation/config.txt seems unchanged.
>   Was the merge successful? [y/n]

Does this happen now even with merge tools for which we do trust the exit code? If so, my original concern is addressed.

Show 13 quoted lines
> > 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?
> 
> Yes, that's correct. If the user has *manually* configured a tool, why would
> you ask him again? We are annoying the overwhelming the vast majority of users
> who already configured the right tool in order to avoid issues with a minute
> minority that might potentially but unlikely have a problem once or twice.
> 
> That's not productive.

We're asking to user to signal that he's happy to launch the mergetool and implicitly giving him an opportunity to break out of the session. I don't see anything wrong with having this behaviour.

So long as we don't hit the loop-with-lots-of-error-trace for users who haven't set mergetool.prompt I've no strong objections to changing the default so long as an explictly set mergetool.prompt is respected.

Ideally, I think I'd like the prompt to accept a "launch/skip/abort" range of options but that's a wider scoped thing. Sometimes when I'm resolving a lot of things and not specifying any paths I come across something that know I don't want to attempt a resolve with my currently configured tool and I just want to skip it for now. Currently, I have to either abort the session or let the mergetool fire up and close it again neither of which are optimal.

Previous: Felipe ContrerasNext: Felipe Contreras
Message 8 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.