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

Re: [PATCH v2 0/5] stash completion miscellany

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 26, 2026, 08:48 UTC
Message-ID
<at8TywNz2WcDc-0c@pks.im>
In-Reply-To
<cover.1792761643.git.ben.knoble@gmail.com>
On Fri, Oct 23, 2026 at 09:20:50AM -0400, D. Ben Knoble wrote:
Show 12 quoted lines
> Diff-intervalle contre v1 :
> 1:  d0e461a14a ! 1:  90d36b6445 completion: simplify stash subcommand completion
>     @@ Commit message
>          The stash completion helper contains a hard-coded list of commands, but
>          git-stash provides a mechanism to list such commands
>          (--git-completion-helper). The pattern for using it is wrapped by
>     -    __git_resolve_builtins, so use it, bring _git_stash closer in line with
>     -    other completion helpers.
>     +    __git_resolve_builtins, so use it, bringing _git_stash closer in line
>     +    with other completion helpers. As a nice side-benefit, this also adds
>     +    "store" subcommand completion, which is missing from the explicit list
>     +    of subcommands.
Yup.
Show 13 quoted lines
>     -    Note that we maintain the "save" special case, since it was removed from
>     +    Note that we maintain the "save" special case†, since it was removed from
>          default completion in 0eb5a4f911 (completion: stop showing 'save' for
>     -    stash by default, 2018-04-20). We don't have to do anything special with
>     -    the exclude (3rd) argument to __git_resolve_builtins, though, because
>     -    save is already marked PARSE_OPT_NOCOMPLETE.
>     +    stash by default, 2018-04-20). One might think we need to give "save" to
>     +    __git_resolve_builtins' 3rd exclude argument to prevent it from
>     +    showing up, but we don't: "save" is already marked PARSE_OPT_NOCOMPLETE.
>     +
>     +    †We don't complete the "save" subcommand unless at least "sa" has been
>     +    typed, but we do complete its options if explicitly typed. With this
>     +    change, we will complete "save" if GIT_COMPLETION_SHOW_ALL=1.
Good.
Show 13 quoted lines
> 5:  d1d0bf2d9a ! 5:  0266646fb4 completion: drop "stash save" completion altogether
>     @@ Commit message
>          further documentation suggesting to use it.
>      
>          Since we recommend push instead, stop completing for "save" and remove a
>     -    special case in completion code.
>     +    special case in completion code. It still appears for "git stash <tab>"
>     +    when GIT_COMPLETION_SHOW_ALL=1, and when typed explicitly we still
>     +    complete options for
>     +
>     +        git stash save --<tab>
>     +
>     +    which is helpful for folks with finger-memory for save.
Agreed, documenting the status quo feels reasonable to me.
So overall I'm happy with this v2, thanks!
Patrick
Previous: Kristoffer HaugsbakkNext: Junio C Hamano
Message 27 of 28 in “stash completion miscellany”
  1. 0/5 stash completion miscellanyD. Ben Knoble, Oct 12, 2026
  2. 1/5 completion: simplify stash subcommand completionD. Ben Knoble, Oct 12, 2026
  3. Patrick SteinhardtOct 16, 2026
  4. Ben KnobleOct 19, 2026
  5. 2/5 completion: extract common stash listing codeD. Ben Knoble, Oct 12, 2026
  6. 3/5 completion: fix Zsh handling of stash namesD. Ben Knoble, Oct 12, 2026
  7. Patrick SteinhardtOct 16, 2026
  8. Ben KnobleOct 19, 2026
  9. 4/5 doc: drop usage mentions of "git stash save"D. Ben Knoble, Oct 12, 2026
  10. Patrick SteinhardtOct 16, 2026
  11. 5/5 completion: drop "stash save" completion altogetherD. Ben Knoble, Oct 12, 2026
  12. Patrick SteinhardtOct 16, 2026
  13. Ben KnobleOct 19, 2026
  14. Patrick SteinhardtOct 20, 2026
  15. D. Ben KnobleOct 22, 2026
  16. Patrick SteinhardtOct 23, 2026
  17. 0/5 stash completion miscellanyD. Ben Knoble, Oct 23, 2026
  18. 1/5 completion: simplify stash subcommand completionD. Ben Knoble, Oct 23, 2026
  19. 2/5 Completion: extract common stash listing codeD. Ben Knoble, Oct 23, 2026
  20. Junio C HamanoOct 23, 2026
  21. 3/5 completion: fix Zsh handling of stash namesD. Ben Knoble, Oct 23, 2026
  22. 4/5 doc: drop usage mentions of "git stash save"D. Ben Knoble, Oct 23, 2026
  23. 5/5 completion: drop "stash save" completion altogetherD. Ben Knoble, Oct 23, 2026
  24. Junio C HamanoOct 23, 2026
  25. Ben KnobleOct 23, 2026
  26. Kristoffer HaugsbakkOct 23, 2026
  27. Patrick SteinhardtOct 26, 2026
  28. Junio C HamanoOct 26, 2026

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.