{"thread":{"id":"30764","subject":"[PATCH] api-credential.txt: document that helpers field is filled-in automatically","startedAt":"2012-06-11T10:46:14Z","lastAt":"2012-06-12T14:48:29Z","messageCount":6,"participants":["Matthieu Moy","Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"193297","messageId":"1339411574-22998-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"30764","inReplyTo":null,"subject":"[PATCH] api-credential.txt: document that helpers field is filled-in automatically","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2012-06-11T10:46:14Z","receivedAt":"2012-06-11T10:46:14Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"It was unclear whether the field was to be specified by the user of the\nAPI.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n\nA quick grep in Git's source code seems to show that no user of the\nAPI explicitely modify this \"helpers\" field (except test-credential.c).\n\n Documentation/technical/api-credentials.txt | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/technical/api-credentials.txt b/Documentation/technical/api-credentials.txt\nindex 21ca6a2..fc6d2b9 100644\n--- a/Documentation/technical/api-credentials.txt\n+++ b/Documentation/technical/api-credentials.txt\n@@ -46,7 +46,9 @@ Functions\n \tconsulting helpers, then asking the user. After this function\n \treturns, the username and password fields of the credential are\n \tguaranteed to be non-NULL. If an error occurs, the function will\n-\tdie().\n+\tdie(). The `helpers` member of the structure is filled-in\n+\taccording to the corresponding configuration variables before\n+\tconsulting helpers.\n \n `credential_reject`::\n \n-- \n1.7.11.rc0.57.g84a04c7\n"},{"id":"193321","messageId":"7vzk897rqi.fsf@alter.siamese.dyndns.org","threadId":"30764","inReplyTo":"1339411574-22998-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH] api-credential.txt: document that helpers field is filled-in automatically","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-11T16:12:05Z","receivedAt":"2012-06-11T16:12:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n\n> It was unclear whether the field was to be specified by the user of the\n> API.\n>\n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n>\n> A quick grep in Git's source code seems to show that no user of the\n> API explicitely modify this \"helpers\" field (except test-credential.c).\n\nIt is correct that the C API asks helpers that the user configured,\nbut I think it is common across three API functions, not limited to\ncredential_fill().  credential_apply_config() is called from approve\nand reject, too.\n\n>  Documentation/technical/api-credentials.txt | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n>\n> diff --git a/Documentation/technical/api-credentials.txt b/Documentation/technical/api-credentials.txt\n> index 21ca6a2..fc6d2b9 100644\n> --- a/Documentation/technical/api-credentials.txt\n> +++ b/Documentation/technical/api-credentials.txt\n> @@ -46,7 +46,9 @@ Functions\n>  \tconsulting helpers, then asking the user. After this function\n>  \treturns, the username and password fields of the credential are\n>  \tguaranteed to be non-NULL. If an error occurs, the function will\n> -\tdie().\n> +\tdie(). The `helpers` member of the structure is filled-in\n> +\taccording to the corresponding configuration variables before\n> +\tconsulting helpers.\n>  \n>  `credential_reject`::\n"},{"id":"193336","messageId":"1339437107-25909-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"30764","inReplyTo":"7vzk897rqi.fsf@alter.siamese.dyndns.org","subject":"[PATCH] api-credential.txt: document that helpers field is filled-in automatically","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2012-06-11T17:51:47Z","receivedAt":"2012-06-11T17:51:47Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"It was unclear whether the field was to be specified by the user of the\nAPI.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n> It is correct that the C API asks helpers that the user configured,\n> but I think it is common across three API functions, not limited to\n> credential_fill().  credential_apply_config() is called from approve\n> and reject, too.\n\nAh, right, so compared to v1, we can move the sentence to the\ndescription of the \"helpers\" field, like this:\n\n Documentation/technical/api-credentials.txt | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/technical/api-credentials.txt b/Documentation/technical/api-credentials.txt\nindex 21ca6a2..48f51ed 100644\n--- a/Documentation/technical/api-credentials.txt\n+++ b/Documentation/technical/api-credentials.txt\n@@ -21,7 +21,9 @@ Data Structures\n The `helpers` member of the struct is a `string_list` of helpers.  Each\n string specifies an external helper which will be run, in order, to\n either acquire or store credentials. See the section on credential\n-helpers below.\n+helpers below. This list is filled-in by the API functions\n+according to the corresponding configuration variables before\n+consulting helpers.\n +\n This struct should always be initialized with `CREDENTIAL_INIT` or\n `credential_init`.\n-- \n1.7.11.rc0.57.g84a04c7\n"},{"id":"193358","messageId":"20120611190811.GB20889@sigill.intra.peff.net","threadId":"30764","inReplyTo":"1339437107-25909-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH] api-credential.txt: document that helpers field is filled-in automatically","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-06-11T19:08:11Z","receivedAt":"2012-06-11T19:08:11Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jun 11, 2012 at 07:51:47PM +0200, Matthieu Moy wrote:\n\n> It was unclear whether the field was to be specified by the user of the\n> API.\n> \n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n> > It is correct that the C API asks helpers that the user configured,\n> > but I think it is common across three API functions, not limited to\n> > credential_fill().  credential_apply_config() is called from approve\n> > and reject, too.\n> \n> Ah, right, so compared to v1, we can move the sentence to the\n> description of the \"helpers\" field, like this:\n\nI think this is OK. Technically it loads other matching config, as well\n(filling in default username fields and respecting useHttpPath). I don't\nknow if it is worth mentioning them, too.\n\n> diff --git a/Documentation/technical/api-credentials.txt b/Documentation/technical/api-credentials.txt\n> index 21ca6a2..48f51ed 100644\n> --- a/Documentation/technical/api-credentials.txt\n> +++ b/Documentation/technical/api-credentials.txt\n> @@ -21,7 +21,9 @@ Data Structures\n>  The `helpers` member of the struct is a `string_list` of helpers.  Each\n>  string specifies an external helper which will be run, in order, to\n>  either acquire or store credentials. See the section on credential\n> -helpers below.\n> +helpers below. This list is filled-in by the API functions\n> +according to the corresponding configuration variables before\n> +consulting helpers.\n\nYou might want to say something like \"...and therefore there is usually\nno need for a caller to modify the helpers field at all\".\n\n-Peff\n"},{"id":"193428","messageId":"vpq7gvcx40y.fsf@bauges.imag.fr","threadId":"30764","inReplyTo":"20120611190811.GB20889@sigill.intra.peff.net","subject":"Re: [PATCH] api-credential.txt: document that helpers field is filled-in automatically","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2012-06-12T09:39:41Z","receivedAt":"2012-06-12T09:39:41Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Mon, Jun 11, 2012 at 07:51:47PM +0200, Matthieu Moy wrote:\n>\n>> It was unclear whether the field was to be specified by the user of the\n>> API.\n>> \n>> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n>> ---\n>> > It is correct that the C API asks helpers that the user configured,\n>> > but I think it is common across three API functions, not limited to\n>> > credential_fill().  credential_apply_config() is called from approve\n>> > and reject, too.\n>> \n>> Ah, right, so compared to v1, we can move the sentence to the\n>> description of the \"helpers\" field, like this:\n>\n> I think this is OK. Technically it loads other matching config, as well\n> (filling in default username fields and respecting useHttpPath). I don't\n> know if it is worth mentioning them, too.\n\nProbably not, but I don't care much here. The \"helpers\" field was\nparticular in that by reading the documentation, I first thought that\nthe caller may have a reason to fill-in this field.\n\n>> -helpers below.\n>> +helpers below. This list is filled-in by the API functions\n>> +according to the corresponding configuration variables before\n>> +consulting helpers.\n>\n> You might want to say something like \"...and therefore there is usually\n> no need for a caller to modify the helpers field at all\".\n\nAgreed. I see that Junio already has this fixup in pu. Junio, let me\nknow if you prefer a resend.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"193447","messageId":"7vehpk4mde.fsf@alter.siamese.dyndns.org","threadId":"30764","inReplyTo":"vpq7gvcx40y.fsf@bauges.imag.fr","subject":"Re: [PATCH] api-credential.txt: document that helpers field is filled-in automatically","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-12T14:48:29Z","receivedAt":"2012-06-12T14:48:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Agreed. I see that Junio already has this fixup in pu. Junio, let me\n> know if you prefer a resend.\n\nI take it that you told me to squash that fixup in, so will do.\nIt's much easier for me ;-)\n\nThanks.\n"}]}