git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] api-credential.txt: document that helpers field is filled-in automatically

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 11, 2012, 16:12 UTC
Message-ID
<7vzk897rqi.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1339411574-22998-1-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 8 quoted lines
> It was unclear whether the field was to be specified by the user of the
> API.
>
> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
> ---
>
> A quick grep in Git's source code seems to show that no user of the
> API explicitely modify this "helpers" field (except test-credential.c).

It is correct that the C API asks helpers that the user configured, but I think it is common across three API functions, not limited to credential_fill(). credential_apply_config() is called from approve and reject, too.

Show 17 quoted lines
>  Documentation/technical/api-credentials.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/technical/api-credentials.txt b/Documentation/technical/api-credentials.txt
> index 21ca6a2..fc6d2b9 100644
> --- a/Documentation/technical/api-credentials.txt
> +++ b/Documentation/technical/api-credentials.txt
> @@ -46,7 +46,9 @@ Functions
>  	consulting helpers, then asking the user. After this function
>  	returns, the username and password fields of the credential are
>  	guaranteed to be non-NULL. If an error occurs, the function will
> -	die().
> +	die(). The `helpers` member of the structure is filled-in
> +	according to the corresponding configuration variables before
> +	consulting helpers.
>  
>  `credential_reject`::
Previous: Matthieu MoyNext: Matthieu Moy
Message 2 of 6 in “api-credential.txt: document that helpers field is filled-in automatically”
  1. api-credential.txt: document that helpers field is filled-in automaticallyMatthieu Moy, Jun 11, 2012
  2. Junio C HamanoJun 11, 2012
  3. api-credential.txt: document that helpers field is filled-in automaticallyMatthieu Moy, Jun 11, 2012
  4. Jeff KingJun 11, 2012
  5. Matthieu MoyJun 12, 2012
  6. Junio C HamanoJun 12, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.