From: Patrick Steinhardt <ps@pks.im>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
"Rubén Justo" <rjusto@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH 5/5] completion: drop "stash save" completion altogether
Date: Fri, 23 Oct 2026 08:21:10 +0200 [thread overview]
Message-ID: <atr81upZrCofQACJ@pks.im> (raw)
In-Reply-To: <CALnO6CCUfja_AxYjbz9xpZgoibbdvy6C4utDDQk9ONhjiOYYzg@mail.gmail.com>
On Thu, Oct 22, 2026 at 09:14:52AM -0400, D. Ben Knoble wrote:
> On Tue, Oct 20, 2026 at 2:05 AM Patrick Steinhardt <ps@pks.im> wrote:
> >
> > On Mon, Oct 19, 2026 at 04:01:15PM -0400, Ben Knoble wrote:
> > >
> > > > Le 16 oct. 2026 à 04:01, Patrick Steinhardt <ps@pks.im> a écrit :
> > > >
> > > > On Mon, Oct 12, 2026 at 01:48:31PM -0400, D. Ben Knoble wrote:
> > > >> 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.
> > > >
> > > > This is the only part I'm a bit torn on. I think it's reasonable to not
> > > > autocomplete the "save" command, but if the user manually types it,
> > > > should we really stop autocompleting its options altogether?
> > > >
> > > > Maybe the answer is "yes". After all, as you mentioned in the preceding
> > > > commit, the command is deprecated since 2017 already! And after almost
> > > > 10 years I think it's fair to start giving users more nudges into the
> > > > direction of using "push" instead.
> > > >
> > > > One note though: the command _will_ be completed in the case where you
> > > > have GIT_COMPLETION_SHOW_ALL set
> > >
> > > I should definitely mention SHOW_ALL; I’m not actually sure
> > > what happens for « git stash save --<TAB> » with this patch,
> > > so I’ll double-check. I actually wonder if it will complete options.
> > >
> > > Would that satisfy you if so ?
> >
> > Probably depends on the outcome of your tests, but ultimately I think
> > I'd be fine with either of the options. But if we stop autocompleting we
> > should definitely mention SHOW_ALL.
>
> Here's what my testing showed (all Zsh):
>
> - with SHOW_ALL, "git stash <tab>" lists "save" as an option; "git
> stash save --<tab>" completes options
> - without SHOW_ALL, "git stash <tab>" does not list "save"; "git stash
> sa<tab>" does not complete "save"; "git stash save --<tab>" completes
> options
>
> I'll update the commit locally to reflect this. Thoughts?
We could of course add logic to explicitly stop completing options for
the deprecated subcommand. But I doubt it's worth it? So I think this is
good enough.
Patrick
next prev parent reply other threads:[~2026-10-23 6:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 17:48 [PATCH 0/5] stash completion miscellany D. Ben Knoble
2026-10-12 17:48 ` [PATCH 1/5] completion: simplify stash subcommand completion D. Ben Knoble
2026-10-16 8:01 ` Patrick Steinhardt
2026-10-19 19:58 ` Ben Knoble
2026-10-12 17:48 ` [PATCH 2/5] completion: extract common stash listing code D. Ben Knoble
2026-10-12 17:48 ` [PATCH 3/5] completion: fix Zsh handling of stash names D. Ben Knoble
2026-10-16 8:01 ` Patrick Steinhardt
2026-10-19 19:56 ` Ben Knoble
2026-10-12 17:48 ` [PATCH 4/5] doc: drop usage mentions of "git stash save" D. Ben Knoble
2026-10-16 8:01 ` Patrick Steinhardt
2026-10-12 17:48 ` [PATCH 5/5] completion: drop "stash save" completion altogether D. Ben Knoble
2026-10-16 8:01 ` Patrick Steinhardt
2026-10-19 20:01 ` Ben Knoble
2026-10-20 6:05 ` Patrick Steinhardt
2026-10-22 13:14 ` D. Ben Knoble
2026-10-23 6:21 ` Patrick Steinhardt [this message]
2026-10-23 13:20 ` [PATCH v2 0/5] stash completion miscellany D. Ben Knoble
2026-10-23 13:20 ` [PATCH v2 1/5] completion: simplify stash subcommand completion D. Ben Knoble
2026-10-23 13:20 ` [PATCH v2 2/5] Completion: extract common stash listing code D. Ben Knoble
2026-10-23 17:06 ` Junio C Hamano
2026-10-23 13:20 ` [PATCH v2 3/5] completion: fix Zsh handling of stash names D. Ben Knoble
2026-10-23 13:20 ` [PATCH v2 4/5] doc: drop usage mentions of "git stash save" D. Ben Knoble
2026-10-23 13:20 ` [PATCH v2 5/5] completion: drop "stash save" completion altogether D. Ben Knoble
2026-10-23 17:06 ` Junio C Hamano
2026-10-23 18:07 ` Ben Knoble
2026-10-23 14:33 ` [PATCH v2 0/5] stash completion miscellany Kristoffer Haugsbakk
2026-10-26 8:48 ` Patrick Steinhardt
2026-10-26 14:30 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atr81upZrCofQACJ@pks.im \
--to=ps@pks.im \
--cc=avarab@gmail.com \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=rjusto@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.