mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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:
6
ws.c
6
ws.c
@@ -71,7 +71,7 @@ unsigned parse_whitespace_rule(const char *string)
|
||||
return rule;
|
||||
}
|
||||
|
||||
static void setup_whitespace_attr_check(struct git_attr_check *check)
|
||||
static void setup_whitespace_attr_check(struct attr_check_item *check)
|
||||
{
|
||||
static struct git_attr *attr_whitespace;
|
||||
|
||||
@@ -82,10 +82,10 @@ static void setup_whitespace_attr_check(struct git_attr_check *check)
|
||||
|
||||
unsigned whitespace_rule(const char *pathname)
|
||||
{
|
||||
struct git_attr_check attr_whitespace_rule;
|
||||
struct attr_check_item attr_whitespace_rule;
|
||||
|
||||
setup_whitespace_attr_check(&attr_whitespace_rule);
|
||||
if (!git_check_attr(pathname, 1, &attr_whitespace_rule)) {
|
||||
if (!git_check_attrs(pathname, 1, &attr_whitespace_rule)) {
|
||||
const char *value;
|
||||
|
||||
value = attr_whitespace_rule.value;
|
||||
|
||||
Reference in New Issue
Block a user