git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "John Cai via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, John Cai <johncai86@gmail.com>
Subject: Re: [PATCH] attr: fix instructions on how to check attrs
Date: Sun, 22 Jan 2023 08:10:27 -0800	[thread overview]
Message-ID: <xmqq8rhuturw.fsf@gitster.g> (raw)
In-Reply-To: <pull.1441.git.git.1674356774172.gitgitgadget@gmail.com> (John Cai via GitGitGadget's message of "Sun, 22 Jan 2023 03:06:14 +0000")

"John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:

> 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.

> 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

  reply	other threads:[~2023-01-22 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22  3:06 [PATCH] attr: fix instructions on how to check attrs John Cai via GitGitGadget
2023-01-22 16:10 ` Junio C Hamano [this message]
2023-01-23  4:07   ` John Cai
2023-01-23  4:22 ` [PATCH v2] " John Cai via GitGitGadget
2023-01-26 21:21   ` [PATCH v3] " John Cai via GitGitGadget
2023-01-26 22:17     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8rhuturw.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johncai86@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).