]> git.ipfire.org Git - thirdparty/git.git/commit - attr.c
attr: convert git_all_attrs() to use "struct attr_check"
authorJunio C Hamano <gitster@pobox.com>
Mon, 30 Jan 2017 18:06:08 +0000 (10:06 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Feb 2017 21:46:52 +0000 (13:46 -0800)
commit7f8641112de8724a565a47b0f0b2a9b826b6baa9
treea543fba28417ba7e054d11f812f53ce8c33cf60e
parent37293768d0482f41c5aa7d34cf91b03fdfee9d4e
attr: convert git_all_attrs() to use "struct attr_check"

This updates the other two ways the attribute check is done via an
array of "struct attr_check_item" elements.  These two niches
appear only in "git check-attr".

 * The caller does not know offhand what attributes it wants to ask
   about and cannot use attr_check_initl() to prepare the
   attr_check structure.

 * The caller may not know what attributes it wants to ask at all,
   and instead wants to learn everything that the given path has.

Such a caller can call attr_check_alloc() to allocate an empty
attr_check, and then call attr_check_append() to add attribute names
one by one.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c
attr.h
builtin/check-attr.c