Re: [PATCH v2 03/12] attr.c: update a stale comment on "struct match_attr"
- From
Stefan Beller <sbeller@google.com>
- Date
- May 16, 2016, 23:34 UTC
- Message-ID
- <CAGZ79kZW6GRC8As5oX6CXbTarcU86x_+e8=ksABQubXJGkVhiQ@mail.gmail.com>
- In-Reply-To
- <20160516210545.6591-4-gitster@pobox.com>
On Mon, May 16, 2016 at 2:05 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
> When 82dce998 (attr: more matching optimizations from .gitignore,
> 2012-10-15) changed a pointer to a string "*pattern" into an
> embedded "struct pattern" in struct match_attr, it forgot to update
> the comment that describes the structure.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> attr.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/attr.c b/attr.c
> index 45aec1b..4ae7801 100644
> --- a/attr.c
> +++ b/attr.c
> @@ -131,9 +131,8 @@ struct pattern {
> * If is_macro is true, then u.attr is a pointer to the git_attr being
> * defined.
> *
> - * If is_macro is false, then u.pattern points at the filename pattern
> - * to which the rule applies. (The memory pointed to is part of the
> - * memory block allocated for the match_attr instance.)
> + * If is_macro is false, then u.pat is the filename pattern to which the
> + * rule applies.and we don't need to talk about memory ownership here as that is clear for 'struct pattern' documented elsewhere?
Show 10 quoted lines
> * > * In either case, num_attr is the number of attributes affected by > * this rule, and state is an array listing them. The attributes are > -- > 2.8.2-748-gfb85f76 > > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html