From: Junio C Hamano Date: Fri, 23 Oct 2026 17:06:27 GMT Subject: Re: [PATCH v2 5/5] completion: drop "stash save" completion altogether Message-ID: In-Reply-To: <0266646fb4e6eb4932ec728ce425af9886e5f146.1792761643.git.ben.knoble@gmail.com> "D. Ben Knoble" writes: > It's been deprecated since fd2ebf14db (stash: mark "git stash save" > deprecated in the man page, 2017-10-22) and the previous commit removed > further documentation suggesting to use it. > > Since we recommend push instead, stop completing for "save" and remove a > special case in completion code. It still appears for "git stash " > when GIT_COMPLETION_SHOW_ALL=1, and when typed explicitly we still > complete options for > > git stash save -- > > which is helpful for folks with finger-memory for save. Well, if we can replace the command line to "git stash push --" on the first and then start completing for "stash push" with the second , it would be superb. > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash > index 697fef5462..9cd9c7cadb 100644 > --- a/contrib/completion/git-completion.bash > +++ b/contrib/completion/git-completion.bash > @@ -3558,16 +3558,13 @@ _git_stash () > __git_resolve_builtins stash > > subcommands="$___git_resolved_builtins" > - subcommand="$(__git_find_on_cmdline "$subcommands save")" > + subcommand="$(__git_find_on_cmdline "$subcommands")" > > if [ -z "$subcommand" ]; then > case "$((cword - __git_cmd_idx)),$cur" in > *,--*) > __gitcomp_builtin stash_push > ;; > - 1,sa*) > - __gitcomp "save" > - ;; Nice to see this go. This would have been maintenance nightmare if left forever as we will have to remember updating it when "sa" no longer becomes a unique prefix.