Re: [PATCH 17/36] attr: expose validity check for attribute names
- From
Stefan Beller <sbeller@google.com>
- Date
- Oct 27, 2016, 20:57 UTC
- Message-ID
- <CAGZ79kb+BRPPA8NGKXq_9cb_ob9CK0vkuX0gZV7-qJ-pcYVCzg@mail.gmail.com>
- In-Reply-To
- <CAGZ79ka_zr_NXKoxC45swFrj168fP6S7_nQ1jjcfPOtTN4Jd1A@mail.gmail.com>
On Mon, Oct 24, 2016 at 2:07 PM, Stefan Beller <sbeller@google.com> wrote:
Show 29 quoted lines
> On Sun, Oct 23, 2016 at 8:07 AM, Ramsay Jones > <ramsay@ramsayjones.plus.com> wrote: >> >> >> On 23/10/16 00:32, Stefan Beller wrote: >>> From: Junio C Hamano <gitster@pobox.com> >>> >>> Export attr_name_valid() function, and a helper function that >>> returns the message to be given when a given <name, len> pair >>> is not a good name for an attribute. >>> >>> We could later update the message to exactly spell out what the >>> rules for a good attribute name are, etc. >>> >>> Signed-off-by: Junio C Hamano <gitster@pobox.com> >>> Signed-off-by: Stefan Beller <sbeller@google.com> >>> --- >> >> [snip] >> >>> +extern int attr_name_valid(const char *name, size_t namelen); >>> +extern void invalid_attr_name_message(struct strbuf *, const char *, int); >>> + >> >> The symbol 'attr_name_valid()' is not used outside of attr.c, even >> by the end of this series. Do you expect this function to be used >> in any future series? (The export is deliberate and it certainly >> seems like it should be part of the public interface, but ...) >>
refactoring this series again, I will make use of attr_name_valid outside of attr.c, so I'll keep this patch.