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

Re: [PATCH 2/3] Add -n/--no-prompt option to mergetool

From
Charles Bailey <charles@hashpling.org>
Date
Oct 23, 2008, 06:44 UTC
Message-ID
<20081023064455.GA10675@hashpling.org>
In-Reply-To
<7vr668tdvy.fsf@gitster.siamese.dyndns.org>
On Wed, Oct 22, 2008 at 04:21:21PM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Charles Bailey <charles@hashpling.org> writes:
> 
> > I'm pretty keen on this patch, but have no strong opinions on which
> > short option is used, so are there any votes against -y?
> 
> Between 'n' and 'y', I am in favour of the latter, but at the same time I
> have to wonder if there are other commands that would want "Assume yes"
> option.  It could be that this single command that prompts for "Is this
> Ok" is an oddball and giving it an "interactive" option to trigger the
> current behaviour might make things more consistent.  I dunno.
> 

I think that git mergetool probably counts as at least 'unusual', and I think that there is some merit in the current default behaviour. It gives you a prompt at which you can C-c if it's about to run something that you don't want it to do the first few times that you try mergetool.

After more thoughts, I'm somewhat in favour of dropping the short switch altogether. As it just saves a single keypress per merge I imagine that most mergetool users, once they discover this new feature and decide that they want to use it, will prefer to use a user config option to switch it on. The command line option then becomes something that you would only need to use to override your normal default and something on which to hang the option description in the man page.

-- 
Charles Bailey
http://ccgi.hashpling.plus.com/blog/
Previous: Junio C HamanoNext: William Pursell
Message 9 of 13 in “Fix some tab/space inconsistencies in git-mergetool.sh”
  1. 1/3 Fix some tab/space inconsistencies in git-mergetool.shCharles Bailey, Oct 21, 2008
  2. 2/3 Add -n/--no-prompt option to mergetoolCharles Bailey, Oct 21, 2008
  3. 3/3 Add -k/--keep-going option to mergetoolCharles Bailey, Oct 21, 2008
  4. Jeff KingOct 21, 2008
  5. Andreas EricssonOct 21, 2008
  6. Charles BaileyOct 21, 2008
  7. Charles BaileyOct 22, 2008
  8. Junio C HamanoOct 22, 2008
  9. Charles BaileyOct 23, 2008
  10. William PursellOct 24, 2008
  11. Charles BaileyOct 24, 2008
  12. William PursellOct 25, 2008
  13. Charles BaileyNov 13, 2008

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.