completion: drop "stash save" completion altogether

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 <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.

Signed-off-by: D. Ben Knoble <ben.knoble@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
D. Ben Knoble authored and Junio C Hamano committed 2026-10-23 08:32:18 -07:00
1 parent 0a93af8053
commit 1ae1ddeba3
1 file changed
+1 -4
+1 -4
View File
@@ -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"
;;
1,*)
__gitcomp "$subcommands"
;;