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

Re: [PATCH 0/3] completion: improvements for git stash

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 18, 2018, 08:32 UTC
Message-ID
<xmqqh8o8j4ni.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180417212945.24002-1-t.gummerer@gmail.com>
Thomas Gummerer <t.gummerer@gmail.com> writes:
> In this series we stop completing the 'git stash save' subcommand in
> git-completion.bash.  The command has been deprecated for a while,...

Anything deprecated in Oct 2017 is still too young in Git's timescale, but this is the right thing to do in the longer term.

Regarding [2/3], I think 
 - It is perfectly fine to stop offering "save" among the choices
   when "git stash <TAB>" is given, so that we AVOID actively
   suggesting "save" to those who do not know (or do not want to
   learn) about it.  Instead we would knudge them towards "push".
   After all, that is what "deprecation" is all about.
 - It also is OK to limit the offering to "show" against "git stash
   s<TAB>", even though the user _could_ have meant "save" than the
   above case with totally empty subcommand name.
 - It is questionable to stop offering "save" to "git stash
   sav<TAB>" it is clear that the user wants to say "save" in this
   case, as there is no other subcommand the user could have meant.
 - It is outright hostile to the end user if we stop completing "git
   stash save --q<TAB>" with "--quiet".  At that point, we _know_
   that the user wants "save", and getting in the way of those who
   know what they are using does not feel quite right.

Of course, being more accomodating to existing users by taking the last two points above seriously would raise a separate issue of when we stop doing so, and if we should start doing something else. If there is a way to implement a "reluctant completion" that gives "save" as a completion choice while giving a deprecation warning to let the user know of the plan for removal of "save", that would be good, for example.

Thanks.
Previous: Thomas GummererNext: Thomas Gummerer
Message 5 of 12 in “completion: improvements for git stash”
  1. 0/3 completion: improvements for git stashThomas Gummerer, Apr 17, 2018
  2. 1/3 completion: rename save_opts to default_opts for stashThomas Gummerer, Apr 17, 2018
  3. 2/3 completion: stop completing 'save' as stash subcommandThomas Gummerer, Apr 17, 2018
  4. 3/3 completion: make stash -p and alias for stash push -pThomas Gummerer, Apr 17, 2018
  5. Junio C HamanoApr 18, 2018
  6. Thomas GummererApr 18, 2018
  7. 0/2 completion: improvements for git stashThomas Gummerer, Apr 19, 2018
  8. 1/2 completion: stop showing 'save' for stash by defaultThomas Gummerer, Apr 19, 2018
  9. Duy NguyenApr 20, 2018
  10. Thomas GummererApr 22, 2018
  11. 2/2 completion: make stash -p and alias for stash push -pThomas Gummerer, Apr 19, 2018
  12. Junio C HamanoApr 20, 2018

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.