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

Re: [PATCH v2 2/2] completion: checkout: complete paths when ref given

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 14, 2017, 22:45 UTC
Message-ID
<xmqqefz075or.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<9be8b988-f5b3-7365-ae7f-b46888253f4c@tngtech.com>
Cornelius Weig <cornelius.weig@tngtech.com> writes:
Show 7 quoted lines
> Hmm.. I'm a bit reluctant to let go of this just yet, because it was my
> original motivation for the whole patch. I admit that it may be
> confusing to not get completion in your example. However, I think that
> once acquainted with the new behavior, a user who wants some files
> cleaned would start by having a look at the list of files from "git
> checkout HEAD <TAB><TAB>". That's probably faster than spelling the
> first few characters and hit <TAB> for a file that's already clean.

I understand that "git checkout HEAD frotz<TAB>" that gives 47 other paths that all begin with "foo", when "frotz27" is the only one among them that you know you changed, is not very useful to narrow things down.

But it is equally irritating when you know "frotz27" is the only path that begins with "frotz" (after all, that is why you decided to stop typing after saying "frotz" and letting the comletion kick in) but you are not certain if you touched it. The completion being silent may be an indication that it is not modified, OR it may be an indication that you mistyped the leading part "frotz", and leaves you wondering.

Previous: Cornelius WeigNext: SZEDER Gábor
Message 8 of 12 in “completion: complete modified files for checkout with '--'”
  1. completion: complete modified files for checkout with '--'cornelius.weig@tngtech.com, Feb 13, 2017
  2. SZEDER GáborFeb 14, 2017
  3. Cornelius WeigFeb 14, 2017
  4. 1/2 completion: extract utility to complete paths from tree-ishcornelius.weig@tngtech.com, Feb 14, 2017
  5. 2/2 completion: checkout: complete paths when ref givencornelius.weig@tngtech.com, Feb 14, 2017
  6. Junio C HamanoFeb 14, 2017
  7. Cornelius WeigFeb 14, 2017
  8. Junio C HamanoFeb 14, 2017
  9. SZEDER GáborFeb 15, 2017
  10. Cornelius WeigFeb 15, 2017
  11. SZEDER GáborFeb 15, 2017
  12. Cornelius WeigFeb 15, 2017

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.