{"thread":{"id":"39251","subject":"[PATCH] completion: remove credential helpers from porcelain commands","startedAt":"2015-05-05T13:19:32Z","lastAt":"2015-05-06T10:26:42Z","messageCount":5,"participants":["SZEDER Gábor","Erik Faye-Lund","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"260590","messageId":"1430831972-6788-1-git-send-email-szeder@ira.uka.de","threadId":"39251","inReplyTo":null,"subject":"[PATCH] completion: remove credential helpers from porcelain commands","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2015-05-05T13:19:32Z","receivedAt":"2015-05-05T13:19:32Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Don't offer the \"main\" 'git credential' command or any of the credential\nhelpers from contrib/credential/ when completing git commands.\n\nSigned-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n\nI was tempted to simply filter out 'credential-*', so we don't have to\nupdate this list when new credential helpers arrive.  However, the\n'git-credential-*' \"namespace\" is not explicitly reserved for credential\nhelpers, users have to set the 'credential.helper' config variable to tell\nexplicitly that 'git-credential-foo' should be used as credential helper,\nand who knows, someone might have his own 'git-credential-bar' command that\ndoes something completely unrelated to git's credential system, so in the\nend decided against it.  And credential helpers don't pop up too frequently\nanyway.\n\nHowever, if you think filtering out 'credential-*' is the way to go, I'm\nhappy to reroll.\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 e0eb6ae..527bb00 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -665,8 +665,13 @@ __git_list_porcelain_commands ()\n \t\tcheckout-index)   : plumbing;;\n \t\tcommit-tree)      : plumbing;;\n \t\tcount-objects)    : infrequent;;\n+\t\tcredential        : credentials;;\n \t\tcredential-cache) : credentials helper;;\n+\t\tcredential-gnome-keyring) : credentials helpe;;\n+\t\tcredential-netrc) : credentials helper;;\n+\t\tcredential-osxkeychain) : credentials helper;;\n \t\tcredential-store) : credentials helper;;\n+\t\tcredential-wincred) : credentials helper;;\n \t\tcvsexportcommit)  : export;;\n \t\tcvsimport)        : import;;\n \t\tcvsserver)        : daemon;;\n-- \n1.9.5.msysgit.0\n"},{"id":"260601","messageId":"CABPQNSZAbhzQKoYS=QNOyqUEm0yA9nbFpx8NZdgQ-CiC-rQXVw@mail.gmail.com","threadId":"39251","inReplyTo":"1430831972-6788-1-git-send-email-szeder@ira.uka.de","subject":"Re: [PATCH] completion: remove credential helpers from porcelain commands","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2015-05-05T14:28:04Z","receivedAt":"2015-05-05T14:28:04Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, May 5, 2015 at 3:19 PM, SZEDER Gábor <szeder@ira.uka.de> wrote:\n> Don't offer the \"main\" 'git credential' command or any of the credential\n> helpers from contrib/credential/ when completing git commands.\n>\n> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>\n> ---\n>\n> I was tempted to simply filter out 'credential-*', so we don't have to\n> update this list when new credential helpers arrive.  However, the\n> 'git-credential-*' \"namespace\" is not explicitly reserved for credential\n> helpers, users have to set the 'credential.helper' config variable to tell\n> explicitly that 'git-credential-foo' should be used as credential helper,\n> and who knows, someone might have his own 'git-credential-bar' command that\n> does something completely unrelated to git's credential system, so in the\n> end decided against it.  And credential helpers don't pop up too frequently\n> anyway.\n>\n> However, if you think filtering out 'credential-*' is the way to go, I'm\n> happy to reroll.\n>\n>  contrib/completion/git-completion.bash | 5 +++++\n>  1 file changed, 5 insertions(+)\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index e0eb6ae..527bb00 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -665,8 +665,13 @@ __git_list_porcelain_commands ()\n>                 checkout-index)   : plumbing;;\n>                 commit-tree)      : plumbing;;\n>                 count-objects)    : infrequent;;\n> +               credential        : credentials;;\n>                 credential-cache) : credentials helper;;\n> +               credential-gnome-keyring) : credentials helpe;;\n\nTypo? Should be \"helper;;\", no?\n"},{"id":"260620","messageId":"20150505200607.GB12067@peff.net","threadId":"39251","inReplyTo":"1430831972-6788-1-git-send-email-szeder@ira.uka.de","subject":"Re: [PATCH] completion: remove credential helpers from porcelain commands","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-05-05T20:06:07Z","receivedAt":"2015-05-05T20:06:07Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, May 05, 2015 at 03:19:32PM +0200, SZEDER Gábor wrote:\n\n> Don't offer the \"main\" 'git credential' command or any of the credential\n> helpers from contrib/credential/ when completing git commands.\n\nMakes sense to me, modulo the typo Erik pointed out.\n\n> I was tempted to simply filter out 'credential-*', so we don't have to\n> update this list when new credential helpers arrive.  However, the\n> 'git-credential-*' \"namespace\" is not explicitly reserved for credential\n> helpers, users have to set the 'credential.helper' config variable to tell\n> explicitly that 'git-credential-foo' should be used as credential helper,\n> and who knows, someone might have his own 'git-credential-bar' command that\n> does something completely unrelated to git's credential system, so in the\n> end decided against it.  And credential helpers don't pop up too frequently\n> anyway.\n> \n> However, if you think filtering out 'credential-*' is the way to go, I'm\n> happy to reroll.\n\nI'd actually be fine with just marking all credential-* as \"credentials\nhelper\". I think we have staked out the \"git-credential-foo\" namespace,\nso anybody putting something unrelated in there deserves what they get.\nAnd it makes one fewer list to keep up to date.\n\nI _do_ have other git-credential-foo's that should be ignored (and are\nnot in your list), but I am probably the only person in the world (they\nare due to me experimenting with the credential helper code :) ).\n\n-Peff\n"},{"id":"260622","messageId":"xmqqzj5id7v7.fsf@gitster.dls.corp.google.com","threadId":"39251","inReplyTo":"20150505200607.GB12067@peff.net","subject":"Re: [PATCH] completion: remove credential helpers from porcelain commands","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-05T21:36:44Z","receivedAt":"2015-05-05T21:36:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>> However, if you think filtering out 'credential-*' is the way to go, I'm\n>> happy to reroll.\n>\n> I'd actually be fine with just marking all credential-* as \"credentials\n> helper\". I think we have staked out the \"git-credential-foo\" namespace,\n> so anybody putting something unrelated in there deserves what they get.\n> And it makes one fewer list to keep up to date.\n>\n> I _do_ have other git-credential-foo's that should be ignored (and are\n> not in your list), but I am probably the only person in the world (they\n> are due to me experimenting with the credential helper code :) ).\n\nLet's do this on top of the \"typofix helper\" one, as there was\nanother show-stopper typo.  I could also amend the log message\nand declare that we now squat on git-credential-<anything>, but\nI do not think it is necessary.\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex fdf0ddc..af78212 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -665,13 +665,8 @@ __git_list_porcelain_commands ()\n \t\tcheckout-index)   : plumbing;;\n \t\tcommit-tree)      : plumbing;;\n \t\tcount-objects)    : infrequent;;\n-\t\tcredential        : credentials;;\n-\t\tcredential-cache) : credentials helper;;\n-\t\tcredential-gnome-keyring) : credentials helper;;\n-\t\tcredential-netrc) : credentials helper;;\n-\t\tcredential-osxkeychain) : credentials helper;;\n-\t\tcredential-store) : credentials helper;;\n-\t\tcredential-wincred) : credentials helper;;\n+\t\tcredential)       : credentials;;\n+\t\tcredential-*)     : credentials helper;;\n \t\tcvsexportcommit)  : export;;\n \t\tcvsimport)        : import;;\n \t\tcvsserver)        : daemon;;\n"},{"id":"260662","messageId":"20150506122642.Horde.JpisdKtEAos7MJrZqzdelw4@webmail.informatik.kit.edu","threadId":"39251","inReplyTo":"xmqqzj5id7v7.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] completion: remove credential helpers from porcelain commands","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2015-05-06T10:26:42Z","receivedAt":"2015-05-06T10:26:42Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\nQuoting Junio C Hamano <gitster@pobox.com>:\n\n> Jeff King <peff@peff.net> writes:\n>\n>>> However, if you think filtering out 'credential-*' is the way to go, I'm\n>>> happy to reroll.\n>>\n>> I'd actually be fine with just marking all credential-* as \"credentials\n>> helper\". I think we have staked out the \"git-credential-foo\" namespace,\n>> so anybody putting something unrelated in there deserves what they get.\n>> And it makes one fewer list to keep up to date.\n>>\n>> I _do_ have other git-credential-foo's that should be ignored (and are\n>> not in your list), but I am probably the only person in the world (they\n>> are due to me experimenting with the credential helper code :) ).\n>\n> Let's do this on top of the \"typofix helper\" one, as there was\n> another show-stopper typo.  I could also amend the log message\n> and declare that we now squat on git-credential-<anything>, but\n> I do not think it is necessary.\n>\n> diff --git a/contrib/completion/git-completion.bash  \n> b/contrib/completion/git-completion.bash\n> index fdf0ddc..af78212 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -665,13 +665,8 @@ __git_list_porcelain_commands ()\n>  \t\tcheckout-index)   : plumbing;;\n>  \t\tcommit-tree)      : plumbing;;\n>  \t\tcount-objects)    : infrequent;;\n> -\t\tcredential        : credentials;;\n> -\t\tcredential-cache) : credentials helper;;\n> -\t\tcredential-gnome-keyring) : credentials helper;;\n> -\t\tcredential-netrc) : credentials helper;;\n> -\t\tcredential-osxkeychain) : credentials helper;;\n> -\t\tcredential-store) : credentials helper;;\n> -\t\tcredential-wincred) : credentials helper;;\n> +\t\tcredential)       : credentials;;\n> +\t\tcredential-*)     : credentials helper;;\n>  \t\tcvsexportcommit)  : export;;\n>  \t\tcvsimport)        : import;;\n>  \t\tcvsserver)        : daemon;;\n\nYeah, that's it.\n\nBest,\nGábor\n"}]}