{"thread":{"id":"48316","subject":"[PATCH 0/3] completion: improvements for git stash","startedAt":"2018-04-17T21:29:58Z","lastAt":"2018-04-22T20:36:30Z","messageCount":12,"participants":["Thomas Gummerer","Junio C Hamano","Duy Nguyen"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"344939","messageId":"20180417212945.24002-1-t.gummerer@gmail.com","threadId":"48316","inReplyTo":null,"subject":"[PATCH 0/3] completion: improvements for git stash","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-04-17T21:29:42Z","receivedAt":"2018-04-17T21:29:58Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"In this series we stop completing the 'git stash save' subcommand in\ngit-completion.bash.  The command has been deprecated for a while, so\nI think we're doing the users a disservice by still completing it,\nmaking them think it's still supported while we already deprecated it.\n\nThe first commit is a preparatory step for doing that, while the third\ncommit is an improvement that I thought would be good to do \"while\nthere\".  The most interesting part of the series should be the second\ncommit, where we actually remove the completion of 'git stash save'.\n\nThomas Gummerer (3):\n  completion: rename save_opts to default_opts for stash\n  completion: stop completing 'save' as stash subcommand\n  completion: make stash -p and alias for stash push -p\n\n contrib/completion/git-completion.bash | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)\n\n-- \n2.17.0.252.gfe0a9eaf31\n\n"},{"id":"344940","messageId":"20180417212945.24002-2-t.gummerer@gmail.com","threadId":"48316","inReplyTo":"20180417212945.24002-1-t.gummerer@gmail.com","subject":"[PATCH 1/3] completion: rename save_opts to default_opts for stash","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-04-17T21:29:43Z","receivedAt":"2018-04-17T21:30:02Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"'git stash save' is deprecated, but we still call the options for\ncompletion 'save_opts'.  Simply renaming them to 'push_opts' is not\nideal because for example '--message foo' can't be passed directly to\n'git stash', as non-option arguments are not allowed, and foo would be\ntreated as one.\n\nCompleting '--message' in 'git stash --<tab>' would end up being quite\nconfusing for the user.  Therefore name them 'default_opts', and keep\ntreating --message specially for 'git stash push'.\n\nThe ulterior motive for renaming 'save_opts' is that in the next\ncommit we're going to stop completing 'git stash save', so 'save_opts'\nwould be the only remaining thing referring to 'git stash save', which\nwould probably be confusing for future readers of this code.\n\nSigned-off-by: Thomas Gummerer <t.gummerer@gmail.com>\n---\n contrib/completion/git-completion.bash | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex a757073945..39c123926c 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2773,16 +2773,16 @@ _git_show_branch ()\n \n _git_stash ()\n {\n-\tlocal save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'\n+\tlocal default_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'\n \tlocal subcommands='push save list show apply clear drop pop create branch'\n \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n \tif [ -z \"$subcommand\" ]; then\n \t\tcase \"$cur\" in\n \t\t--*)\n-\t\t\t__gitcomp \"$save_opts\"\n+\t\t\t__gitcomp \"$default_opts\"\n \t\t\t;;\n \t\t*)\n-\t\t\tif [ -z \"$(__git_find_on_cmdline \"$save_opts\")\" ]; then\n+\t\t\tif [ -z \"$(__git_find_on_cmdline \"$default_opts\")\" ]; then\n \t\t\t\t__gitcomp \"$subcommands\"\n \t\t\tfi\n \t\t\t;;\n@@ -2790,10 +2790,10 @@ _git_stash ()\n \telse\n \t\tcase \"$subcommand,$cur\" in\n \t\tpush,--*)\n-\t\t\t__gitcomp \"$save_opts --message\"\n+\t\t\t__gitcomp \"$default_opts --message\"\n \t\t\t;;\n \t\tsave,--*)\n-\t\t\t__gitcomp \"$save_opts\"\n+\t\t\t__gitcomp \"$default_opts\"\n \t\t\t;;\n \t\tapply,--*|pop,--*)\n \t\t\t__gitcomp \"--index --quiet\"\n-- \n2.17.0.252.gfe0a9eaf31\n\n"},{"id":"344941","messageId":"20180417212945.24002-3-t.gummerer@gmail.com","threadId":"48316","inReplyTo":"20180417212945.24002-1-t.gummerer@gmail.com","subject":"[PATCH 2/3] completion: stop completing 'save' as stash subcommand","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-04-17T21:29:44Z","receivedAt":"2018-04-17T21:30:04Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"The 'save' subcommand in git stash has been deprecated in\nfd2ebf14db (\"stash: mark \"git stash save\" deprecated in the man page\",\n2017-10-22).  It is however still completed by the git bash\ncompletion.\n\nStop completing the 'save' subcommand as a further step in the\ndeprecation process.  As the only use of the bash completion is\ninteractive, this wouldn't break any scripts, but may give users a\nhint that the command is deprecated.\n\nSigned-off-by: Thomas Gummerer <t.gummerer@gmail.com>\n---\n contrib/completion/git-completion.bash | 5 +----\n 1 file changed, 1 insertion(+), 4 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 39c123926c..452c3d4490 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2774,7 +2774,7 @@ _git_show_branch ()\n _git_stash ()\n {\n \tlocal default_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'\n-\tlocal subcommands='push save list show apply clear drop pop create branch'\n+\tlocal subcommands='push list show apply clear drop pop create branch'\n \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n \tif [ -z \"$subcommand\" ]; then\n \t\tcase \"$cur\" in\n@@ -2792,9 +2792,6 @@ _git_stash ()\n \t\tpush,--*)\n \t\t\t__gitcomp \"$default_opts --message\"\n \t\t\t;;\n-\t\tsave,--*)\n-\t\t\t__gitcomp \"$default_opts\"\n-\t\t\t;;\n \t\tapply,--*|pop,--*)\n \t\t\t__gitcomp \"--index --quiet\"\n \t\t\t;;\n-- \n2.17.0.252.gfe0a9eaf31\n\n"},{"id":"344942","messageId":"20180417212945.24002-4-t.gummerer@gmail.com","threadId":"48316","inReplyTo":"20180417212945.24002-1-t.gummerer@gmail.com","subject":"[PATCH 3/3] completion: make stash -p and alias for stash push -p","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-04-17T21:29:45Z","receivedAt":"2018-04-17T21:30:08Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"We define 'git stash -p' as an alias for 'git stash push -p' in the\nmanpage.  Do the same in the completion script, so all options that\ncan be given to 'git stash push' are being completed when the user is\nusing 'git stash -p --<tab>'.  Currently the only additional option\nthe user will get is '--message', but there may be more in the future.\n\nSigned-off-by: Thomas Gummerer <t.gummerer@gmail.com>\n---\n contrib/completion/git-completion.bash | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 452c3d4490..8bd445b7dc 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2776,6 +2776,9 @@ _git_stash ()\n \tlocal default_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'\n \tlocal subcommands='push list show apply clear drop pop create branch'\n \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n+\tif [ -n \"$(__git_find_on_cmdline \"-p\")\" ]; then\n+\t\tsubcommand=\"push\"\n+\tfi\n \tif [ -z \"$subcommand\" ]; then\n \t\tcase \"$cur\" in\n \t\t--*)\n-- \n2.17.0.252.gfe0a9eaf31\n\n"},{"id":"344973","messageId":"xmqqh8o8j4ni.fsf@gitster-ct.c.googlers.com","threadId":"48316","inReplyTo":"20180417212945.24002-1-t.gummerer@gmail.com","subject":"Re: [PATCH 0/3] completion: improvements for git stash","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-04-18T08:32:49Z","receivedAt":"2018-04-18T08:32:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Gummerer <t.gummerer@gmail.com> writes:\n\n> In this series we stop completing the 'git stash save' subcommand in\n> git-completion.bash.  The command has been deprecated for a while,...\n\nAnything deprecated in Oct 2017 is still too young in Git's\ntimescale, but this is the right thing to do in the longer term.\n\nRegarding [2/3], I think \n\n - It is perfectly fine to stop offering \"save\" among the choices\n   when \"git stash <TAB>\" is given, so that we AVOID actively\n   suggesting \"save\" to those who do not know (or do not want to\n   learn) about it.  Instead we would knudge them towards \"push\".\n   After all, that is what \"deprecation\" is all about.\n\n - It also is OK to limit the offering to \"show\" against \"git stash\n   s<TAB>\", even though the user _could_ have meant \"save\" than the\n   above case with totally empty subcommand name.\n\n - It is questionable to stop offering \"save\" to \"git stash\n   sav<TAB>\" it is clear that the user wants to say \"save\" in this\n   case, as there is no other subcommand the user could have meant.\n\n - It is outright hostile to the end user if we stop completing \"git\n   stash save --q<TAB>\" with \"--quiet\".  At that point, we _know_\n   that the user wants \"save\", and getting in the way of those who\n   know what they are using does not feel quite right.\n\nOf course, being more accomodating to existing users by taking the\nlast two points above seriously would raise a separate issue of when\nwe stop doing so, and if we should start doing something else.  If\nthere is a way to implement a \"reluctant completion\" that gives\n\"save\" as a completion choice while giving a deprecation warning to\nlet the user know of the plan for removal of \"save\", that would be\ngood, for example.\n\nThanks.\n"},{"id":"345019","messageId":"20180418211552.GA31895@hank","threadId":"48316","inReplyTo":"xmqqh8o8j4ni.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 0/3] completion: improvements for git stash","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-04-18T21:15:52Z","receivedAt":"2018-04-18T21:15:56Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"On 04/18, Junio C Hamano wrote:\n> Thomas Gummerer <t.gummerer@gmail.com> writes:\n> \n> > In this series we stop completing the 'git stash save' subcommand in\n> > git-completion.bash.  The command has been deprecated for a while,...\n> \n> Anything deprecated in Oct 2017 is still too young in Git's\n> timescale, but this is the right thing to do in the longer term.\n\nFair enough.  I vaguely remembered this thread [1], that tried to add\n'rm' back to the autocompletion after it was removed originally to try\nand start the deprecation process.  Reading the thread again now\nthough it seems what you outline below to just not show \"save\" when\n\"git stash <TAB>\" or \"git stash s<TAB>\" is typed makes more sense as a\nstep now.\n\nI also notice that we never seemed to have taken any of the\nsuggestions made there (either adding 'rm' back to the completion\noptions, or going further in the deprecation process), though that's a\ndifferent topic :)\n\n> Regarding [2/3], I think \n> \n>  - It is perfectly fine to stop offering \"save\" among the choices\n>    when \"git stash <TAB>\" is given, so that we AVOID actively\n>    suggesting \"save\" to those who do not know (or do not want to\n>    learn) about it.  Instead we would knudge them towards \"push\".\n>    After all, that is what \"deprecation\" is all about.\n> \n>  - It also is OK to limit the offering to \"show\" against \"git stash\n>    s<TAB>\", even though the user _could_ have meant \"save\" than the\n>    above case with totally empty subcommand name.\n> \n>  - It is questionable to stop offering \"save\" to \"git stash\n>    sav<TAB>\" it is clear that the user wants to say \"save\" in this\n>    case, as there is no other subcommand the user could have meant.\n> \n>  - It is outright hostile to the end user if we stop completing \"git\n>    stash save --q<TAB>\" with \"--quiet\".  At that point, we _know_\n>    that the user wants \"save\", and getting in the way of those who\n>    know what they are using does not feel quite right.\n> \n> Of course, being more accomodating to existing users by taking the\n> last two points above seriously would raise a separate issue of when\n> we stop doing so, and if we should start doing something else.  If\n> there is a way to implement a \"reluctant completion\" that gives\n> \"save\" as a completion choice while giving a deprecation warning to\n> let the user know of the plan for removal of \"save\", that would be\n> good, for example.\n\nThanks for the suggestions, I'll take a closer look at what could be\ndone, and will send a re-roll.\n\n> Thanks.\n\n[1]: 01020160a0004473-277c3d7c-4e3b-4c50-9d44-4a106f37f1d9-000000@eu-west-1.amazonses.com\n"},{"id":"345175","messageId":"20180419232514.16572-1-t.gummerer@gmail.com","threadId":"48316","inReplyTo":"20180417212945.24002-1-t.gummerer@gmail.com","subject":"[PATCH v2 0/2] completion: improvements for git stash","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-04-19T23:25:12Z","receivedAt":"2018-04-19T23:25:20Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"Previous round was at <20180417212945.24002-1-t.gummerer@gmail.com>.\n\nThanks Junio for your input on the previous round.\n\nThis round drops what was 1/3 in the previous round.  We keep\ncompleting the options for 'git stash save', so calling the variable\n'save_opts' and defining what would be 'push_opts' as 'save_opts' +\n'--message' makes sense.\n\n2/3 (now 1/2) was mostly rewritten.  We now no longer suggest 'save'\nin 'git stash <tab>', complete 'git stash s<tab>' will complete to\n'git stash show', but 'git stash sa<tab>' (or longer) will keep\ncompleting to 'git stash save', as the user most likely already knows\nabout 'git stash save', and wanted to type that.  We also keep\ncompleting the options for 'git stash save' on 'git stash save\n--<tab>'.\n\n3/3 (now 2/2) stays the same as in the previous round.\n\nI didn't find a good way to implement \"reluctant completion\" (I'm also\nby no means an expert in bash completion, so there may well be a way I\ncouldn't find by googl'ing around), so I left that out of this\nseries.\n\nI don't think it's strictly necessary for the deprecation either, as\nwe can just print a warning message when the user actually uses 'git\nstash save' at some point, which would make a message printed when\nusing the completion redundant anyway.  I feel like that warning\nmessage is not something we're quite ready for yet and I'd rather wait\na few more releases before doing that though.\n\nThomas Gummerer (2):\n  completion: stop showing 'save' for stash by default\n  completion: make stash -p and alias for stash push -p\n\n contrib/completion/git-completion.bash | 12 ++++++++++--\n 1 file changed, 10 insertions(+), 2 deletions(-)\n\n-- \n2.17.0.252.gfe0a9eaf31\n\n"},{"id":"345176","messageId":"20180419232514.16572-2-t.gummerer@gmail.com","threadId":"48316","inReplyTo":"20180419232514.16572-1-t.gummerer@gmail.com","subject":"[PATCH v2 1/2] completion: stop showing 'save' for stash by default","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-04-19T23:25:13Z","receivedAt":"2018-04-19T23:25:23Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"The 'save' subcommand in git stash has been deprecated in\nfd2ebf14db (\"stash: mark \"git stash save\" deprecated in the man page\",\n2017-10-22).\n\nStop showing it when the users enters 'git stash <tab>' or 'git stash\ns<tab>'.  Keep showing it however when the user enters 'git stash sa<tab>'\nor any more characters of the 'save' subcommand.  This is designed to\nnot encourage users to use 'git stash save', but still leaving the\ncompletion option once it's clear that's what the user means.\n\nSigned-off-by: Thomas Gummerer <t.gummerer@gmail.com>\n---\n contrib/completion/git-completion.bash | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex a757073945..9a95b3b7b1 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2774,13 +2774,18 @@ _git_show_branch ()\n _git_stash ()\n {\n \tlocal save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'\n-\tlocal subcommands='push save list show apply clear drop pop create branch'\n-\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n+\tlocal subcommands='push list show apply clear drop pop create branch'\n+\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands save\")\"\n \tif [ -z \"$subcommand\" ]; then\n \t\tcase \"$cur\" in\n \t\t--*)\n \t\t\t__gitcomp \"$save_opts\"\n \t\t\t;;\n+\t\tsa*)\n+\t\t\tif [ -z \"$(__git_find_on_cmdline \"$save_opts\")\" ]; then\n+\t\t\t\t__gitcomp \"save\"\n+\t\t\tfi\n+\t\t\t;;\n \t\t*)\n \t\t\tif [ -z \"$(__git_find_on_cmdline \"$save_opts\")\" ]; then\n \t\t\t\t__gitcomp \"$subcommands\"\n-- \n2.17.0.252.gfe0a9eaf31\n\n"},{"id":"345177","messageId":"20180419232514.16572-3-t.gummerer@gmail.com","threadId":"48316","inReplyTo":"20180419232514.16572-1-t.gummerer@gmail.com","subject":"[PATCH v2 2/2] completion: make stash -p and alias for stash push -p","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-04-19T23:25:14Z","receivedAt":"2018-04-19T23:25:35Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"We define 'git stash -p' as an alias for 'git stash push -p' in the\nmanpage.  Do the same in the completion script, so all options that\ncan be given to 'git stash push' are being completed when the user is\nusing 'git stash -p --<tab>'.  Currently the only additional option\nthe user will get is '--message', but there may be more in the future.\n\nSigned-off-by: Thomas Gummerer <t.gummerer@gmail.com>\n---\n contrib/completion/git-completion.bash | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 9a95b3b7b1..adb6516b6d 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2776,6 +2776,9 @@ _git_stash ()\n \tlocal save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'\n \tlocal subcommands='push list show apply clear drop pop create branch'\n \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands save\")\"\n+\tif [ -n \"$(__git_find_on_cmdline \"-p\")\" ]; then\n+\t\tsubcommand=\"push\"\n+\tfi\n \tif [ -z \"$subcommand\" ]; then\n \t\tcase \"$cur\" in\n \t\t--*)\n-- \n2.17.0.252.gfe0a9eaf31\n\n"},{"id":"345184","messageId":"xmqq36zqd5dg.fsf@gitster-ct.c.googlers.com","threadId":"48316","inReplyTo":"20180419232514.16572-1-t.gummerer@gmail.com","subject":"Re: [PATCH v2 0/2] completion: improvements for git stash","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-04-20T01:38:19Z","receivedAt":"2018-04-20T01:38:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Gummerer <t.gummerer@gmail.com> writes:\n\n> I didn't find a good way to implement \"reluctant completion\" (I'm also\n> by no means an expert in bash completion, so there may well be a way I\n> couldn't find by googl'ing around), so I left that out of this\n> series.\n>\n> I don't think it's strictly necessary for the deprecation either, as\n> we can just print a warning message when the user actually uses 'git\n> stash save' at some point, which would make a message printed when\n> using the completion redundant anyway.  I feel like that warning\n> message is not something we're quite ready for yet and I'd rather wait\n> a few more releases before doing that though.\n\nYeah, I agree that what you outined above is quite sensible.\n\nThanks, will queue.\n"},{"id":"345187","messageId":"CACsJy8BByBCh_DuDu9otO4RLpCnQ+HY-vHi4EDC3_dNQHjM1dg@mail.gmail.com","threadId":"48316","inReplyTo":"20180419232514.16572-2-t.gummerer@gmail.com","subject":"Re: [PATCH v2 1/2] completion: stop showing 'save' for stash by default","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-04-20T05:17:13Z","receivedAt":"2018-04-20T05:17:47Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Fri, Apr 20, 2018 at 1:25 AM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n> The 'save' subcommand in git stash has been deprecated in\n> fd2ebf14db (\"stash: mark \"git stash save\" deprecated in the man page\",\n> 2017-10-22).\n>\n> Stop showing it when the users enters 'git stash <tab>' or 'git stash\n> s<tab>'.  Keep showing it however when the user enters 'git stash sa<tab>'\n> or any more characters of the 'save' subcommand.\n\nI don't think this is worth it. You only save two keystrokes for 've'\nand already waste one on <tab>.\n-- \nDuy\n"},{"id":"345411","messageId":"20180422203632.GA25294@hank","threadId":"48316","inReplyTo":"CACsJy8BByBCh_DuDu9otO4RLpCnQ+HY-vHi4EDC3_dNQHjM1dg@mail.gmail.com","subject":"Re: [PATCH v2 1/2] completion: stop showing 'save' for stash by default","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-04-22T20:36:32Z","receivedAt":"2018-04-22T20:36:30Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"On 04/20, Duy Nguyen wrote:\n> On Fri, Apr 20, 2018 at 1:25 AM, Thomas Gummerer <t.gummerer@gmail.com> wrote:\n> > The 'save' subcommand in git stash has been deprecated in\n> > fd2ebf14db (\"stash: mark \"git stash save\" deprecated in the man page\",\n> > 2017-10-22).\n> >\n> > Stop showing it when the users enters 'git stash <tab>' or 'git stash\n> > s<tab>'.  Keep showing it however when the user enters 'git stash sa<tab>'\n> > or any more characters of the 'save' subcommand.\n> \n> I don't think this is worth it. You only save two keystrokes for 've'\n> and already waste one on <tab>.\n\nI think the main reason for keeping the completion is not actually\nsaving keystrokes, but rather not giving the users the false\nimpression that we removed the command, or that something is wrong\nwith it, without properly warning them before.  That was the main\nreason given in [1] why the completion is useful even for short\ncommands such as 'rm'.\n\nSo while I had the same impression before re-reading that thread, I\nthink keeping the completion for 'git stash sa<tab>' is the right\nthing to do, and we can remove it some time after we started warning\nabout 'git stash save' being deprecated.\n\n[1]: <01020160a0004473-277c3d7c-4e3b-4c50-9d44-4a106f37f1d9-000000@eu-west-1.amazonses.com>\n\n> -- \n> Duy\n"}]}