{"thread":{"id":"30383","subject":"[PATCH] completion: simplify __git_complete_revlist_file","startedAt":"2012-05-01T18:42:56Z","lastAt":"2012-05-07T17:15:23Z","messageCount":6,"participants":["Felipe Contreras","Junio C Hamano","SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"190461","messageId":"1335897776-3726-1-git-send-email-felipe.contreras@gmail.com","threadId":"30383","inReplyTo":null,"subject":"[PATCH] completion: simplify __git_complete_revlist_file","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-05-01T18:42:56Z","receivedAt":"2012-05-01T18:42:56Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Use new __gitcomp_nl; this is the last place that uses COMPREPLY and\ncompgen directly.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n contrib/completion/git-completion.bash |    6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 31f714d..d877a23 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -676,9 +676,7 @@ __git_complete_revlist_file ()\n \t\t*)   pfx=\"$ref:$pfx\" ;;\n \t\tesac\n \n-\t\tlocal IFS=$'\\n'\n-\t\tCOMPREPLY=($(compgen -P \"$pfx\" \\\n-\t\t\t-W \"$(git --git-dir=\"$(__gitdir)\" ls-tree \"$ls\" \\\n+\t\t__gitcomp_nl \"$(git --git-dir=\"$(__gitdir)\" ls-tree \"$ls\" \\\n \t\t\t\t| sed '/^100... blob /{\n \t\t\t\t           s,^.*\t,,\n \t\t\t\t           s,$, ,\n@@ -692,7 +690,7 @@ __git_complete_revlist_file ()\n \t\t\t\t           s,$,/,\n \t\t\t\t       }\n \t\t\t\t       s/^.*\t//')\" \\\n-\t\t\t-- \"$cur_\"))\n+\t\t\t\"$pfx\" \"$cur_\" \"\"\n \t\t;;\n \t*...*)\n \t\tpfx=\"${cur_%...*}...\"\n-- \n1.7.10\n"},{"id":"190505","messageId":"7vfwbj79od.fsf@alter.siamese.dyndns.org","threadId":"30383","inReplyTo":"1335897776-3726-1-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH] completion: simplify __git_complete_revlist_file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-01T23:39:46Z","receivedAt":"2012-05-01T23:39:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> Use new __gitcomp_nl; this is the last place that uses COMPREPLY and\n> compgen directly.\n>\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n>  contrib/completion/git-completion.bash |    6 ++----\n>  1 file changed, 2 insertions(+), 4 deletions(-)\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 31f714d..d877a23 100755\n\nThis seems to be based on 'maint', which has 31f714d, but I see two hits\nwith \"git grep 'COMPREPLY.*compgen' contrib/completion\" there, so I am not\nsure if that is where you wanted it to apply.\n\nI see this was not addressed to me (neither was the other zsh one), so I\ntake it that the patch is still for discussion, at least for the purpose\nof today's integration round.  Ping me when it is ready for either 'pu' or\n'next'.\n\nThanks.\n"},{"id":"190506","messageId":"CAMP44s0z5ghcDQOeL1TrJJ7nw4=tN5MhACqcmf4EjxsNNWiQnA@mail.gmail.com","threadId":"30383","inReplyTo":"7vfwbj79od.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] completion: simplify __git_complete_revlist_file","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-05-01T23:46:32Z","receivedAt":"2012-05-01T23:46:32Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Wed, May 2, 2012 at 1:39 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n>> Use new __gitcomp_nl; this is the last place that uses COMPREPLY and\n>> compgen directly.\n>>\n>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n>> ---\n>>  contrib/completion/git-completion.bash |    6 ++----\n>>  1 file changed, 2 insertions(+), 4 deletions(-)\n>>\n>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>> index 31f714d..d877a23 100755\n>\n> This seems to be based on 'maint', which has 31f714d, but I see two hits\n> with \"git grep 'COMPREPLY.*compgen' contrib/completion\" there, so I am not\n> sure if that is where you wanted it to apply.\n\nThe last place that is not the __gitcomp* functions, of course.\n\n> I see this was not addressed to me (neither was the other zsh one), so I\n> take it that the patch is still for discussion, at least for the purpose\n> of today's integration round.  Ping me when it is ready for either 'pu' or\n> 'next'.\n\nI'd say at least one person should say LGTM before asking you to integrate it.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"190845","messageId":"CAMP44s3gbWCn=dB0sgDLSjfDyWFAj5zzQeHOL0exBMVP2UVgbw@mail.gmail.com","threadId":"30383","inReplyTo":"CAMP44s0z5ghcDQOeL1TrJJ7nw4=tN5MhACqcmf4EjxsNNWiQnA@mail.gmail.com","subject":"Re: [PATCH] completion: simplify __git_complete_revlist_file","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-05-05T15:19:21Z","receivedAt":"2012-05-05T15:19:21Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Wed, May 2, 2012 at 1:46 AM, Felipe Contreras\n<felipe.contreras@gmail.com> wrote:\n> On Wed, May 2, 2012 at 1:39 AM, Junio C Hamano <gitster@pobox.com> wrote:\n\n>> I see this was not addressed to me (neither was the other zsh one), so I\n>> take it that the patch is still for discussion, at least for the purpose\n>> of today's integration round.  Ping me when it is ready for either 'pu' or\n>> 'next'.\n>\n> I'd say at least one person should say LGTM before asking you to integrate it.\n\nNobody has raised any issues with this, so, please merge it to 'pu'.\nThis is so straight-forward that it might make sense to move to 'next'\nthrough.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"190867","messageId":"20120505224014.GH2164@goldbirke","threadId":"30383","inReplyTo":"CAMP44s0z5ghcDQOeL1TrJJ7nw4=tN5MhACqcmf4EjxsNNWiQnA@mail.gmail.com","subject":"Re: [PATCH] completion: simplify __git_complete_revlist_file","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2012-05-05T22:40:14Z","receivedAt":"2012-05-05T22:40:14Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Hi,\n\n\nOn Wed, May 02, 2012 at 01:46:32AM +0200, Felipe Contreras wrote:\n> On Wed, May 2, 2012 at 1:39 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> > Felipe Contreras <felipe.contreras@gmail.com> writes:\n> >\n> >> Use new __gitcomp_nl; this is the last place that uses COMPREPLY and\n> >> compgen directly.\n\nI didn't dare to touch that code back then while doing the\n__gitcomp_nl() changes; that sed command looked way too scary ;) But\nall it does is to process the output of 'git ls-tree' and removes the\ncruft and appends a space to filenames and a '/' to directories\n(without a trailing space).  So invoking __gitcomp_nl() with an empty\nsuffix parameter is OK, as it doesn't change the current behavior.\n\n> >> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> >> ---\n> >>  contrib/completion/git-completion.bash |    6 ++----\n> >>  1 file changed, 2 insertions(+), 4 deletions(-)\n> >>\n> >> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> >> index 31f714d..d877a23 100755\n> >\n> > This seems to be based on 'maint', which has 31f714d, but I see two hits\n> > with \"git grep 'COMPREPLY.*compgen' contrib/completion\" there, so I am not\n> > sure if that is where you wanted it to apply.\n> \n> The last place that is not the __gitcomp* functions, of course.\n> \n> > I see this was not addressed to me (neither was the other zsh one), so I\n> > take it that the patch is still for discussion, at least for the purpose\n> > of today's integration round.  Ping me when it is ready for either 'pu' or\n> > 'next'.\n> \n> I'd say at least one person should say LGTM before asking you to integrate it.\n\nYeah, it's good to go.\n\n\nBest,\nGábor\n"},{"id":"191011","messageId":"7vehqv7w0k.fsf@alter.siamese.dyndns.org","threadId":"30383","inReplyTo":"CAMP44s0z5ghcDQOeL1TrJJ7nw4=tN5MhACqcmf4EjxsNNWiQnA@mail.gmail.com","subject":"Re: [PATCH] completion: simplify __git_complete_revlist_file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-07T17:15:23Z","receivedAt":"2012-05-07T17:15:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> On Wed, May 2, 2012 at 1:39 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> ...\n>> This seems to be based on 'maint', which has 31f714d, but I see two hits\n>> with \"git grep 'COMPREPLY.*compgen' contrib/completion\" there, so I am not\n>> sure if that is where you wanted it to apply.\n>\n> The last place that is not the __gitcomp* functions, of course.\n\nOK, that is what you meant by \"uses ... _directly_\".  With SG's Ack, will\nqueue.\n"}]}