Skip to content

Commit d932f4e

Browse files
mhaggergitster
authored andcommitted
Rename git_checkattr() to git_check_attr()
Suggested by: Junio Hamano <[email protected]> Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ca64d06 commit d932f4e

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

Documentation/technical/api-gitattributes.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Data Structure
1919
`struct git_attr_check`::
2020

2121
This structure represents a set of attributes to check in a call
22-
to `git_checkattr()` function, and receives the results.
22+
to `git_check_attr()` function, and receives the results.
2323

2424

2525
Attribute Values
@@ -52,7 +52,7 @@ Querying Specific Attributes
5252
attributes you would want to check. To populate this array, you would
5353
need to define necessary attributes by calling `git_attr()` function.
5454

55-
* Call `git_checkattr()` to check the attributes for the path.
55+
* Call `git_check_attr()` to check the attributes for the path.
5656

5757
* Inspect `git_attr_check` structure to see how each of the attribute in
5858
the array is defined for the path.
@@ -78,13 +78,13 @@ static void setup_check(void)
7878
}
7979
------------
8080

81-
. Call `git_checkattr()` with the prepared array of `struct git_attr_check`:
81+
. Call `git_check_attr()` with the prepared array of `struct git_attr_check`:
8282

8383
------------
8484
const char *path;
8585

8686
setup_check();
87-
git_checkattr(path, ARRAY_SIZE(check), check);
87+
git_check_attr(path, ARRAY_SIZE(check), check);
8888
------------
8989

9090
. Act on `.value` member of the result, left in `check[]`:

archive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static int write_archive_entry(const unsigned char *sha1, const char *base,
123123
path_without_prefix = path.buf + args->baselen;
124124

125125
setup_archive_check(check);
126-
if (!git_checkattr(path_without_prefix, ARRAY_SIZE(check), check)) {
126+
if (!git_check_attr(path_without_prefix, ARRAY_SIZE(check), check)) {
127127
if (ATTR_TRUE(check[0].value))
128128
return 0;
129129
convert = ATTR_TRUE(check[1].value);

attr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ static void collect_all_attrs(const char *path)
731731
rem = fill(path, pathlen, stk, rem);
732732
}
733733

734-
int git_checkattr(const char *path, int num, struct git_attr_check *check)
734+
int git_check_attr(const char *path, int num, struct git_attr_check *check)
735735
{
736736
int i;
737737

attr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extern const char git_attr__false[];
2020
#define ATTR_UNSET(v) ((v) == NULL)
2121

2222
/*
23-
* Send one or more git_attr_check to git_checkattr(), and
23+
* Send one or more git_attr_check to git_check_attr(), and
2424
* each 'value' member tells what its value is.
2525
* Unset one is returned as NULL.
2626
*/
@@ -36,7 +36,7 @@ struct git_attr_check {
3636
*/
3737
char *git_attr_name(struct git_attr *);
3838

39-
int git_checkattr(const char *path, int, struct git_attr_check *);
39+
int git_check_attr(const char *path, int, struct git_attr_check *);
4040

4141
/*
4242
* Retrieve all attributes that apply to the specified path. *num

builtin/check-attr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ static void check_attr(int cnt, struct git_attr_check *check,
4545
const char *file)
4646
{
4747
if (check != NULL) {
48-
if (git_checkattr(file, cnt, check))
49-
die("git_checkattr died");
48+
if (git_check_attr(file, cnt, check))
49+
die("git_check_attr died");
5050
output_attr(cnt, check, file);
5151
} else {
5252
if (git_all_attrs(file, &cnt, &check))

builtin/pack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ static int no_try_delta(const char *path)
634634
struct git_attr_check check[1];
635635

636636
setup_delta_attr_check(check);
637-
if (git_checkattr(path, ARRAY_SIZE(check), check))
637+
if (git_check_attr(path, ARRAY_SIZE(check), check))
638638
return 0;
639639
if (ATTR_FALSE(check->value))
640640
return 1;

convert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ static void convert_attrs(struct conv_attrs *ca, const char *path)
727727
git_config(read_convert_config, NULL);
728728
}
729729

730-
if (!git_checkattr(path, NUM_CONV_ATTRS, ccheck)) {
730+
if (!git_check_attr(path, NUM_CONV_ATTRS, ccheck)) {
731731
ca->crlf_action = git_path_check_crlf(path, ccheck + 4);
732732
if (ca->crlf_action == CRLF_GUESS)
733733
ca->crlf_action = git_path_check_crlf(path, ccheck + 0);

ll-merge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static int git_path_check_merge(const char *path, struct git_attr_check check[2]
330330
check[0].attr = git_attr("merge");
331331
check[1].attr = git_attr("conflict-marker-size");
332332
}
333-
return git_checkattr(path, 2, check);
333+
return git_check_attr(path, 2, check);
334334
}
335335

336336
static void normalize_file(mmfile_t *mm, const char *path)
@@ -387,7 +387,7 @@ int ll_merge_marker_size(const char *path)
387387

388388
if (!check.attr)
389389
check.attr = git_attr("conflict-marker-size");
390-
if (!git_checkattr(path, 1, &check) && check.value) {
390+
if (!git_check_attr(path, 1, &check) && check.value) {
391391
marker_size = atoi(check.value);
392392
if (marker_size <= 0)
393393
marker_size = DEFAULT_CONFLICT_MARKER_SIZE;

userdiff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ struct userdiff_driver *userdiff_find_by_path(const char *path)
270270

271271
if (!path)
272272
return NULL;
273-
if (git_checkattr(path, 1, &check))
273+
if (git_check_attr(path, 1, &check))
274274
return NULL;
275275

276276
if (ATTR_TRUE(check.value))

ws.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ unsigned whitespace_rule(const char *pathname)
8888
struct git_attr_check attr_whitespace_rule;
8989

9090
setup_whitespace_attr_check(&attr_whitespace_rule);
91-
if (!git_checkattr(pathname, 1, &attr_whitespace_rule)) {
91+
if (!git_check_attr(pathname, 1, &attr_whitespace_rule)) {
9292
const char *value;
9393

9494
value = attr_whitespace_rule.value;

0 commit comments

Comments
 (0)