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

Re: [RFD] minor frustration in 'git add' pathname completion

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 24, 2016, 22:27 UTC
Message-ID
<xmqq7fgr7brd.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqbn637cpe.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> On Thu, Mar 24, 2016 at 2:44 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Discuss.
>>
>>> For example, I keep
>>> a backup version of whats-cooking.txt in the working tree that I use
>>> to manage the 'todo' branch as whats-cooking.txt+, and this is not
>>> explicitly "ignored".
>>
>> Completely side tracking thought: Have you considered ignoring
>> whats-cooking.txt+ locally?
>
> The point is that I shouldn't have to.  I wasn't asking for a
> workaround.

More importantly, I suspect that it would not work very well as a workaround.

If I were to explicitly ignore that file, then even though I know whats-cooking.txt is not ignored,

    $ git add whats-coo<HT>

would not offer anything. I'd be left scratching my head, wondering if I mistyped the early part of the filename (e.g. "wahts-coo<HT>"?).

I think the source of the irritation comes from the fact that the command line completion can only say "I do not see anything worth adding with the prefix you gave me" by not completing the prefix string to anything, and it cannot explain why it thinks so (e.g. "because the path that matches the prefix is up-to-date and there is no point adding it again" vs "because there is no path that matches the prefix, perhaps you made a typo?"). Loosening (3) might be an effective way to address it.

Previous: Junio C HamanoNext: Stefan Beller
Message 4 of 8 in “[RFD] minor frustration in 'git add' pathname completion”
  1. Junio C HamanoMar 24, 2016
  2. Stefan BellerMar 24, 2016
  3. Junio C HamanoMar 24, 2016
  4. Junio C HamanoMar 24, 2016
  5. Stefan BellerMar 24, 2016
  6. Junio C HamanoMar 24, 2016
  7. Jacob KellerMar 25, 2016
  8. Junio C HamanoMar 24, 2016

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.