{"thread":{"id":"28490","subject":"[PATCH] git-completion: offer references for 'git reflog'","startedAt":"2011-09-25T10:42:46Z","lastAt":"2011-10-04T19:34:25Z","messageCount":4,"participants":["Michael Schubert","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"176161","messageId":"4E7F05A6.30505@elegosoft.com","threadId":"28490","inReplyTo":null,"subject":"[PATCH] git-completion: offer references for 'git reflog'","fromName":"Michael Schubert","fromEmail":"mschub@elegosoft.com","sentAt":"2011-09-25T10:42:46Z","receivedAt":"2011-09-25T10:42:46Z","isPatch":true,"sender":{"key":"mschub@elegosoft.com","avatar":null},"body":"'git reflog <ref>' is a valid command, therefore offer reference\ncompletion.\n\nSigned-off-by: Michael Schubert <mschub@elegosoft.com>\n---\n contrib/completion/git-completion.bash |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 8648a36..63d0f08 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1774,7 +1774,7 @@ _git_reflog ()\n \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n \n \tif [ -z \"$subcommand\" ]; then\n-\t\t__gitcomp \"$subcommands\"\n+\t\t__gitcomp \"$subcommands $(__git_refs)\"\n \telse\n \t\t__gitcomp \"$(__git_refs)\"\n \tfi\n-- \n1.7.7.rc3\n"},{"id":"176827","messageId":"4E8AC85A.2070009@elegosoft.com","threadId":"28490","inReplyTo":"4E7F05A6.30505@elegosoft.com","subject":"Re: [PATCH] git-completion: offer references for 'git reflog'","fromName":"Michael Schubert","fromEmail":"mschub@elegosoft.com","sentAt":"2011-10-04T08:48:26Z","receivedAt":"2011-10-04T08:48:26Z","isPatch":true,"sender":{"key":"mschub@elegosoft.com","avatar":null},"body":"On 09/25/2011 12:42 PM, Michael Schubert wrote:\n> 'git reflog <ref>' is a valid command, therefore offer reference\n> completion.\n> \n> Signed-off-by: Michael Schubert <mschub@elegosoft.com>\n> ---\n>  contrib/completion/git-completion.bash |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 8648a36..63d0f08 100755\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -1774,7 +1774,7 @@ _git_reflog ()\n>  \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n>  \n>  \tif [ -z \"$subcommand\" ]; then\n> -\t\t__gitcomp \"$subcommands\"\n> +\t\t__gitcomp \"$subcommands $(__git_refs)\"\n>  \telse\n>  \t\t__gitcomp \"$(__git_refs)\"\n>  \tfi\n\nPing.?\n"},{"id":"176854","messageId":"7v7h4kd6vg.fsf@alter.siamese.dyndns.org","threadId":"28490","inReplyTo":"4E8AC85A.2070009@elegosoft.com","subject":"Re: [PATCH] git-completion: offer references for 'git reflog'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-04T17:05:55Z","receivedAt":"2011-10-04T17:05:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael Schubert <mschub@elegosoft.com> writes:\n\n> On 09/25/2011 12:42 PM, Michael Schubert wrote:\n>> 'git reflog <ref>' is a valid command, therefore offer reference\n>> completion.\n>> \n>> Signed-off-by: Michael Schubert <mschub@elegosoft.com>\n>> ---\n>>  contrib/completion/git-completion.bash |    2 +-\n>>  1 files changed, 1 insertions(+), 1 deletions(-)\n>> \n>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>> index 8648a36..63d0f08 100755\n>> --- a/contrib/completion/git-completion.bash\n>> +++ b/contrib/completion/git-completion.bash\n>> @@ -1774,7 +1774,7 @@ _git_reflog ()\n>>  \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n>>  \n>>  \tif [ -z \"$subcommand\" ]; then\n>> -\t\t__gitcomp \"$subcommands\"\n>> +\t\t__gitcomp \"$subcommands $(__git_refs)\"\n>>  \telse\n>>  \t\t__gitcomp \"$(__git_refs)\"\n>>  \tfi\n>\n> Ping.?\n\nPersonally I think this change will give much less pleasant user\nexperience.  This is what I currently get:\n\n    $ git reflog <TAB>\n    delete  expire  show\n    $ git reflog\n\nand after learning the \"show\" subcommand exists, this is what I would get:\n\n    $ git reflog show <TAB>\n    Display all 626 possibilities? (y or n)\n\nWith your change, I would get:\n\n    $ git reflog <TAB>\n    Display all 629 possibilities? (y or n)\n\nand do not even have a chance to remind myself if the subcommand to drop\na reflog was \"delete\" or \"remove\".\n\nAt least when I know that I want to be reminded of refs to $verb (use one\nof the three subcommands I currently get in place of the \"$verb\"), I can\nsay\n\n    $ git reflog $verb <TAB>\n\nand at that point, I am willing to wade thru list of 600+ refs.\n"},{"id":"176866","messageId":"4E8B5FC1.3080902@elegosoft.com","threadId":"28490","inReplyTo":"7v7h4kd6vg.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git-completion: offer references for 'git reflog'","fromName":"Michael Schubert","fromEmail":"mschub@elegosoft.com","sentAt":"2011-10-04T19:34:25Z","receivedAt":"2011-10-04T19:34:25Z","isPatch":true,"sender":{"key":"mschub@elegosoft.com","avatar":null},"body":"On 10/04/2011 07:05 PM, Junio C Hamano wrote:\n> Michael Schubert <mschub@elegosoft.com> writes:\n> \n>> On 09/25/2011 12:42 PM, Michael Schubert wrote:\n>>> 'git reflog <ref>' is a valid command, therefore offer reference\n>>> completion.\n>>>\n>>> Signed-off-by: Michael Schubert <mschub@elegosoft.com>\n>>> ---\n>>>  contrib/completion/git-completion.bash |    2 +-\n>>>  1 files changed, 1 insertions(+), 1 deletions(-)\n>>>\n>>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>>> index 8648a36..63d0f08 100755\n>>> --- a/contrib/completion/git-completion.bash\n>>> +++ b/contrib/completion/git-completion.bash\n>>> @@ -1774,7 +1774,7 @@ _git_reflog ()\n>>>  \tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n>>>  \n>>>  \tif [ -z \"$subcommand\" ]; then\n>>> -\t\t__gitcomp \"$subcommands\"\n>>> +\t\t__gitcomp \"$subcommands $(__git_refs)\"\n>>>  \telse\n>>>  \t\t__gitcomp \"$(__git_refs)\"\n>>>  \tfi\n>>\n>> Ping.?\n> \n> Personally I think this change will give much less pleasant user\n> experience.  This is what I currently get:\n> \n>     $ git reflog <TAB>\n>     delete  expire  show\n>     $ git reflog\n> \n> and after learning the \"show\" subcommand exists, this is what I would get:\n> \n>     $ git reflog show <TAB>\n>     Display all 626 possibilities? (y or n)\n> \n> With your change, I would get:\n> \n>     $ git reflog <TAB>\n>     Display all 629 possibilities? (y or n)\n\nYeah, that would be a tradeoff. IMHO the current behaviour is pleasant\nfor newcomers, but (I guess) most users would rather enjoy \"the short form\".\n\n> and do not even have a chance to remind myself if the subcommand to drop\n> a reflog was \"delete\" or \"remove\".\n> \n> At least when I know that I want to be reminded of refs to $verb (use one\n> of the three subcommands I currently get in place of the \"$verb\"), I can\n> say\n> \n>     $ git reflog $verb <TAB>\n> \n> and at that point, I am willing to wade thru list of 600+ refs.\n"}]}