From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH v2 09/12] attr: (re)introduce git_check_attr() and struct git_attr_check
Date: Mon, 16 May 2016 22:06:11 -0700 [thread overview]
Message-ID: <xmqqr3d1xoho.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAPig+cR5ksdATefkYkG7-+a_nK0w+Fdu8ae-Z4=PTp8yAYhiQQ@mail.gmail.com> (Eric Sunshine's message of "Tue, 17 May 2016 00:19:59 -0400")
Eric Sunshine <sunshine@sunshineco.com> writes:
> This field is unused, and git_attr_check_initl() neglects to
> initialize it (if it is intended to be used in the future).
There are two patterns to use the new API:
- initl() variant is "initialize it once, never extend"; it is very
much deliberate. This is used by the majority of current
callers, that know that they want a fixed set of attributes and
can say what attributes they want upfront.
- alloc then append variant will use the usual ALLOC_GROW() pattern
with nr/alloc.
next prev parent reply other threads:[~2016-05-17 5:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 21:05 [PATCH v2 00/12] revamping git_check_attr() API Junio C Hamano
2016-05-16 21:05 ` [PATCH v2 01/12] commit.c: use strchrnul() to scan for one line Junio C Hamano
2016-05-16 23:19 ` Stefan Beller
2016-05-16 23:41 ` Junio C Hamano
2016-05-16 23:46 ` Stefan Beller
2016-05-16 21:05 ` [PATCH v2 02/12] attr.c: " Junio C Hamano
2016-05-16 23:28 ` Stefan Beller
2016-05-16 23:45 ` Junio C Hamano
2016-05-16 21:05 ` [PATCH v2 03/12] attr.c: update a stale comment on "struct match_attr" Junio C Hamano
2016-05-16 23:34 ` Stefan Beller
2016-05-16 23:39 ` Junio C Hamano
2016-05-16 21:05 ` [PATCH v2 04/12] attr.c: explain the lack of attr-name syntax check in parse_attr() Junio C Hamano
2016-05-16 21:05 ` [PATCH v2 05/12] attr.c: complete a sentence in a comment Junio C Hamano
2016-05-16 21:05 ` [PATCH v2 06/12] attr.c: mark where #if DEBUG ends more clearly Junio C Hamano
2016-05-16 21:05 ` [PATCH v2 07/12] attr.c: simplify macroexpand_one() Junio C Hamano
2016-05-16 21:05 ` [PATCH v2 08/12] attr: rename function and struct related to checking attributes Junio C Hamano
2016-05-16 21:05 ` [PATCH v2 09/12] attr: (re)introduce git_check_attr() and struct git_attr_check Junio C Hamano
2016-05-17 4:19 ` Eric Sunshine
2016-05-17 5:06 ` Junio C Hamano [this message]
2016-05-16 21:05 ` [PATCH v2 10/12] attr: convert git_all_attrs() to use "struct git_attr_check" Junio C Hamano
2016-05-17 17:00 ` Junio C Hamano
2016-05-17 21:08 ` Junio C Hamano
2016-05-18 16:34 ` Stefan Beller
2016-05-16 21:05 ` [PATCH v2 11/12] attr: convert git_check_attrs() callers to use the new API Junio C Hamano
2016-05-16 21:05 ` [PATCH v2 12/12] attr: retire git_check_attrs() API Junio C Hamano
2016-05-18 16:51 ` [PATCH v2 00/12] revamping git_check_attr() API Stefan Beller
2016-05-18 18:36 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqr3d1xoho.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.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.
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 NNTP newsgroup(s).