{"thread":{"id":"34051","subject":"[PATCH] completion: add deprecated __git_complete_file ()","startedAt":"2013-06-07T19:09:28Z","lastAt":"2013-06-08T00:35:12Z","messageCount":7,"participants":["Ramkumar Ramachandra","Felipe Contreras","Junio C Hamano","SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"219676","messageId":"1370632168-25298-1-git-send-email-artagnon@gmail.com","threadId":"34051","inReplyTo":null,"subject":"[PATCH] completion: add deprecated __git_complete_file ()","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-07T19:09:28Z","receivedAt":"2013-06-07T19:09:28Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"77c130 (completion: clarify ls-tree, archive, show completion,\n2013-06-02) removed __git_complete_file () because it had no callers\nleft in the file.  However, to avoid breaking user scripts that may\ndepend on this, add it back as a deprecated alias.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Based on pu.\n\n contrib/completion/git-completion.bash | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex d0a9ba4..0fb81c9 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -489,6 +489,11 @@ __git_complete_revlist_file ()\n \tesac\n }\n \n+# no callers; deprecated alias\n+__git_complete_file ()\n+{\n+\t__git_complete_revlist_file\n+}\n \n # __git_complete_index_file requires 1 argument:\n # 1: the options to pass to ls-file\n-- \n1.8.3.244.g98dd9db.dirty\n"},{"id":"219680","messageId":"CAMP44s0_YkZeC_Xrd1XUo=4=yJDy=8wQKYe34uybhXVqi9bd9Q@mail.gmail.com","threadId":"34051","inReplyTo":"1370632168-25298-1-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH] completion: add deprecated __git_complete_file ()","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-06-07T19:25:54Z","receivedAt":"2013-06-07T19:25:54Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Fri, Jun 7, 2013 at 2:09 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n> 77c130 (completion: clarify ls-tree, archive, show completion,\n> 2013-06-02) removed __git_complete_file () because it had no callers\n> left in the file.  However, to avoid breaking user scripts that may\n> depend on this, add it back as a deprecated alias.\n\nThis is fine by me, but at some point we need to decide how we should\nprefix the functions that are supposed to be used by external scripts.\n\nAlso, maybe we should start adding '# TODO remove in v2.0' so we\nremember to do that in v2.0.\n\n-- \nFelipe Contreras\n"},{"id":"219683","messageId":"CALkWK0mvsQC4fbfnd+Kbk6q6qRCQGgGxQ89=D4O1+EKfXgw34A@mail.gmail.com","threadId":"34051","inReplyTo":"CAMP44s0_YkZeC_Xrd1XUo=4=yJDy=8wQKYe34uybhXVqi9bd9Q@mail.gmail.com","subject":"Re: [PATCH] completion: add deprecated __git_complete_file ()","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-07T19:29:54Z","receivedAt":"2013-06-07T19:29:54Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Felipe Contreras wrote:\n> This is fine by me, but at some point we need to decide how we should\n> prefix the functions that are supposed to be used by external scripts.\n\nYeah, I thought __ meant \"internal\" :/\n\n> Also, maybe we should start adding '# TODO remove in v2.0' so we\n> remember to do that in v2.0.\n\nWhile at it, let's also clean up the deprecated zsh nonsense in\ngit-completion.bash.\n"},{"id":"219684","messageId":"CAMP44s0nn_cFNmxy=GXPMYFNy92RbkZyZok7phEHnkc+HHKYfQ@mail.gmail.com","threadId":"34051","inReplyTo":"CALkWK0mvsQC4fbfnd+Kbk6q6qRCQGgGxQ89=D4O1+EKfXgw34A@mail.gmail.com","subject":"Re: [PATCH] completion: add deprecated __git_complete_file ()","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-06-07T19:31:32Z","receivedAt":"2013-06-07T19:31:32Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Fri, Jun 7, 2013 at 2:29 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n> Felipe Contreras wrote:\n>> This is fine by me, but at some point we need to decide how we should\n>> prefix the functions that are supposed to be used by external scripts.\n>\n> Yeah, I thought __ meant \"internal\" :/\n>\n>> Also, maybe we should start adding '# TODO remove in v2.0' so we\n>> remember to do that in v2.0.\n>\n> While at it, let's also clean up the deprecated zsh nonsense in\n> git-completion.bash.\n\nAnd the _git _gitk compatibility wrappers.\n\n-- \nFelipe Contreras\n"},{"id":"219703","messageId":"7vobbhsll3.fsf@alter.siamese.dyndns.org","threadId":"34051","inReplyTo":"1370632168-25298-1-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH] completion: add deprecated __git_complete_file ()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-07T20:38:16Z","receivedAt":"2013-06-07T20:38:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> 77c130 (completion: clarify ls-tree, archive, show completion,\n> 2013-06-02) removed __git_complete_file () because it had no callers\n> left in the file.  However, to avoid breaking user scripts that may\n> depend on this, add it back as a deprecated alias.\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  Based on pu.\n\nWill queue; thanks.  With this, I think it will be safe to push the\nseries in question to 'master'.\n"},{"id":"219770","messageId":"20130608002452.GE31625@goldbirke","threadId":"34051","inReplyTo":"7vobbhsll3.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] completion: add deprecated __git_complete_file ()","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2013-06-08T00:24:52Z","receivedAt":"2013-06-08T00:24:52Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Fri, Jun 07, 2013 at 01:38:16PM -0700, Junio C Hamano wrote:\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n> \n> > 77c130 (completion: clarify ls-tree, archive, show completion,\n> > 2013-06-02) removed __git_complete_file () because it had no callers\n> > left in the file.  However, to avoid breaking user scripts that may\n> > depend on this, add it back as a deprecated alias.\n> >\n> > Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> > ---\n> >  Based on pu.\n> \n> Will queue; thanks.  With this, I think it will be safe to push the\n> series in question to 'master'.\n\nSafe?  Yes, at least scripts won't break because of the missing\nfunction.\n\nHowever, I still think it would be worth reverting at least the hunks\nmodifying the completion functions of ls-tree and archive.  Or better\nyet, the whole series.\n"},{"id":"219772","messageId":"20130608003512.GF31625@goldbirke","threadId":"34051","inReplyTo":"CAMP44s0_YkZeC_Xrd1XUo=4=yJDy=8wQKYe34uybhXVqi9bd9Q@mail.gmail.com","subject":"Re: [PATCH] completion: add deprecated __git_complete_file ()","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2013-06-08T00:35:12Z","receivedAt":"2013-06-08T00:35:12Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Fri, Jun 07, 2013 at 02:25:54PM -0500, Felipe Contreras wrote:\n> On Fri, Jun 7, 2013 at 2:09 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n> > 77c130 (completion: clarify ls-tree, archive, show completion,\n> > 2013-06-02) removed __git_complete_file () because it had no callers\n> > left in the file.  However, to avoid breaking user scripts that may\n> > depend on this, add it back as a deprecated alias.\n> \n> This is fine by me, but at some point we need to decide how we should\n> prefix the functions that are supposed to be used by external scripts.\n\nOr rather how we should prefix the functions that are _not_ supposed\nto be used by external scripts.  That way all public functions would\nretain the \"__git\" prefix and existing scripts calling only common\nfunctions like __git_(heads|git_refs|find_on_cmdline|etc.) would work\nwithout modification.\n\n\nBest,\nGábor\n"}]}