D. Ben Knoble posted a five-patch series of fixes to stash completion. The first is a cleanup he noticed while working on the completion for stash import and export. The next two address a Zsh problem. When Git completes stashes for Zsh, it ends up calling compadd with -Q, so the braces are unquoted and the cursor is left after "stash@{". The list-choices widget then shows the entries, but pressing Tab only adds another brace, apparently because Zsh treats it as a brace expansion. He restructured the code to centralize candidate generation as groundwork for fixing it.

The last two patches go beyond completion. Knoble noted that "git stash save" has been deprecated in the manual since fd2ebf14db (2017), yet later commits restored it to the synopsis and gave it new options. One patch drops it from -h usage and the synopsis while keeping its description in the manual, since other text refers to the save command. Another stops completing "save" and removes a special case in the completion code. It still appears when GIT_COMPLETION_SHOW_ALL=1 is set, and options still complete if "save" is typed explicitly.

Junio C Hamano said he was glad to see two of the special-case constructs go, and called removing the "sa" special case good because it would otherwise have to be updated if "sa" stopped being a unique prefix. He also said it would be superb if completion could replace the command line with "git stash push --" on the first Tab and then complete "stash push" options on the second.

Knoble replied that Zsh could probably do that but it would mean more complex special-casing. He would rather remove the case and leave that nicety to someone motivated to build consensus for it.

Kristoffer Haugsbakk said he thinks it is a decent-to-good idea to leave "save" in. The cover letter says Knoble wanted to start a conversation about restoring the manual to its "no save" state, and that question is still open.