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

Re: [PATCH] git-difftool: allow skipping file by typing 'n' at prompt

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Oct 4, 2011, 23:05 UTC
Message-ID
<CAMK1S_gssgpy7nF46c1roJUCN5yvQaOYfVE_-ZrvMfHGWKvk0w@mail.gmail.com>
In-Reply-To
<7vty7oblpu.fsf@alter.siamese.dyndns.org>
On Wed, Oct 5, 2011 at 12:58 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> Phil Hord <phil.hord@gmail.com> writes:
>
>> On Tue, Oct 4, 2011 at 11:25 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>
>>> I think I've seen this done as: "do this? [Y/n]" elsewhere.
>>>
>>> Not telling you what to do, but trying to feel what others may think.
>>
>> I think so, too.  The [y]/n syntax is not clear enough for me to
>> confidently know what the default value will be.
>
> One downside of "do this [Y,n,m,o,p,q]? " is that it limits us to
> lowercase responses, which means we cannot assign 'q' for quitting from
> the innermost nested context and assign 'Q' for quitting from the whole
> interactive loop (e.g. "git add -p").
>
>    "do this [y,n,m,o,p,q] (default=y)? "

Does this even make a difference in this case? I was going to send out a new patch using [Y/n] instead of my original [y]/n. There's only one loop in this thing, and till now people have been presumably hitting Ctrl-C to get out of it. I see no real need to make that more elegant; all I set out to do is add one teeny weeny bit of functionality to a prompt that -- other than giving you a chance to hit that Ctrl-C -- was not actually doing anything useful at all.

>
> may have been a better choice in hindsight.
>
> No matter what we end up doing, let's try to be consistent.

The only other part of git where I have ever used a prompt is 'git add -p'. Consistency with *that* prompt, to me, would mean colors. And help text. And I'm not sure what else, really, since I only used it superficially.

Isn't that overkill for this case?

I'll wait a few hours for any further comments then send out a patch that is the same as my original one except it uses [Y/n] instead of [y]/n.

Previous: Junio C HamanoNext: Sitaram Chamarty
Message 6 of 14 in “git-difftool: allow skipping file by typing 'n' at prompt”
  1. git-difftool: allow skipping file by typing 'n' at promptSitaram Chamarty, Oct 4, 2011
  2. Junio C HamanoOct 4, 2011
  3. Jeff KingOct 4, 2011
  4. Phil HordOct 4, 2011
  5. Junio C HamanoOct 4, 2011
  6. Sitaram ChamartyOct 4, 2011
  7. git-difftool: allow skipping file by typing 'n' at promptSitaram Chamarty, Oct 6, 2011
  8. Junio C HamanoOct 6, 2011
  9. git-difftool: allow skipping file by typing 'n' at promptSitaram Chamarty, Oct 6, 2011
  10. Junio C HamanoOct 7, 2011
  11. git-difftool: allow skipping file by typing 'n' at promptSitaram Chamarty, Oct 8, 2011
  12. Charles BaileyOct 9, 2011
  13. Junio C HamanoOct 10, 2011
  14. Sitaram ChamartyOct 10, 2011

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.