attr: rename function and struct related to checking attributes

The traditional API to check attributes is to prepare an N-element
array of "struct git_attr_check" and pass N and the array to the
function "git_check_attr()" as arguments.

In preparation to revamp the API to pass a single structure, in
which these N elements are held, rename the type used for these
individual array elements to "struct attr_check_item" and rename
the function to "git_check_attrs()".

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>
This commit is contained in:
Junio C Hamano
2017-01-27 18:01:54 -08:00
parent 7d42ec547c
commit 7bd18054d2
9 changed files with 42 additions and 41 deletions

View File

@ -894,7 +894,7 @@ static void write_pack_file(void)
written, nr_result);
}
static void setup_delta_attr_check(struct git_attr_check *check)
static void setup_delta_attr_check(struct attr_check_item *check)
{
static struct git_attr *attr_delta;
@ -906,10 +906,10 @@ static void setup_delta_attr_check(struct git_attr_check *check)
static int no_try_delta(const char *path)
{
struct git_attr_check check[1];
struct attr_check_item check[1];
setup_delta_attr_check(check);
if (git_check_attr(path, ARRAY_SIZE(check), check))
if (git_check_attrs(path, ARRAY_SIZE(check), check))
return 0;
if (ATTR_FALSE(check->value))
return 1;