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

Re: [PATCH] attr: fix instructions on how to check attrs

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2023, 16:10 UTC
Message-ID
<xmqq8rhuturw.fsf@gitster.g>
In-Reply-To
<pull.1441.git.git.1674356774172.gitgitgadget@gmail.com>
"John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> From: John Cai <johncai86@gmail.com>
>
> The instructions in attr.h describing what functions to call to check
> attributes is missing the index as the first argument to git_check_attr.
>
> Fix this to make it consistent with the actual function signature.

Sounds quite sensible. It would have been very good to explain some research in the above, like

    When 7a400a2c (attr: remove an implicit dependency on the_index,
    2018-08-13) started passing an index_state instance to
    git_check_attr(), it forgot to update the API documentation that
    was in Documentation/technical/api-gitattributes.txt.  Later,
    3a1b3415 (attr: move doc to attr.h, 2019-11-17) moved the API
    documentation to attr.h and made it to a comment, without
    realizing the earlier mistake.
    
or something like that.
Thanks.
Show 15 quoted lines
> diff --git a/attr.h b/attr.h
> index 2f22dffadb3..47f1111f391 100644
> --- a/attr.h
> +++ b/attr.h
> @@ -45,7 +45,7 @@
>   * const char *path;
>   *
>   * setup_check();
> - * git_check_attr(path, check);
> + * git_check_attr(&the_index, path, check);
>   * ------------
>   *
>   * - Act on `.value` member of the result, left in `check->items[]`:
>
> base-commit: 904d404274fef6695c78a6b055edd184b72e2f9b
Previous: John Cai via GitGitGadgetNext: John Cai
Message 2 of 6 in “attr: fix instructions on how to check attrs”
  1. attr: fix instructions on how to check attrsJohn Cai via GitGitGadget, Jan 22, 2023
  2. Junio C HamanoJan 22, 2023
  3. John CaiJan 23, 2023
  4. attr: fix instructions on how to check attrsJohn Cai via GitGitGadget, Jan 23, 2023
  5. attr: fix instructions on how to check attrsJohn Cai via GitGitGadget, Jan 26, 2023
  6. Junio C HamanoJan 26, 2023

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.