Rename git_checkattr() to git_check_attr()

Suggested by: Junio Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Aug 4, 2011 at 06:36 UTC d932f4eb9fc88e93040635d291f6c195ea2e4ee3
10 files changed +16 -16
Documentation/technical/api-gitattributes.txt
+4 -4
@@ -19,7 +19,7 @@ Data Structure
19 `struct git_attr_check`::
20
21 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.
23
24
25 Attribute Values
@@ -52,7 +52,7 @@ Querying Specific Attributes
52 attributes you would want to check. To populate this array, you would
53 need to define necessary attributes by calling `git_attr()` function.
54
55 -* Call `git_checkattr()` to check the attributes for the path.
55 +* Call `git_check_attr()` to check the attributes for the path.
56
57 * Inspect `git_attr_check` structure to see how each of the attribute in
58 the array is defined for the path.
@@ -78,13 +78,13 @@ static void setup_check(void)
78 }
79 ------------
80
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`:
82
83 ------------
84 const char *path;
85
86 setup_check();
87 - git_checkattr(path, ARRAY_SIZE(check), check);
87 + git_check_attr(path, ARRAY_SIZE(check), check);
88 ------------
89
90 . Act on `.value` member of the result, left in `check[]`:
archive.c
+1 -1
@@ -123,7 +123,7 @@ static int write_archive_entry(const unsigned char *sha1, const char *base,
123 path_without_prefix = path.buf + args->baselen;
124
125 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)) {
127 if (ATTR_TRUE(check[0].value))
128 return 0;
129 convert = ATTR_TRUE(check[1].value);
attr.c
+1 -1
@@ -731,7 +731,7 @@ static void collect_all_attrs(const char *path)
731 rem = fill(path, pathlen, stk, rem);
732 }
733
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)
735 {
736 int i;
737
attr.h
+2 -2
@@ -20,7 +20,7 @@ extern const char git_attr__false[];
20 #define ATTR_UNSET(v) ((v) == NULL)
21
22 /*
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
24 * each 'value' member tells what its value is.
25 * Unset one is returned as NULL.
26 */
@@ -36,7 +36,7 @@ struct git_attr_check {
36 */
37 char *git_attr_name(struct git_attr *);
38
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 *);
40
41 /*
42 * Retrieve all attributes that apply to the specified path. *num
builtin/check-attr.c
+2 -2
@@ -45,8 +45,8 @@ static void check_attr(int cnt, struct git_attr_check *check,
45 const char *file)
46 {
47 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");
50 output_attr(cnt, check, file);
51 } else {
52 if (git_all_attrs(file, &cnt, &check))
builtin/pack-objects.c
+1 -1
@@ -634,7 +634,7 @@ static int no_try_delta(const char *path)
634 struct git_attr_check check[1];
635
636 setup_delta_attr_check(check);
637 - if (git_checkattr(path, ARRAY_SIZE(check), check))
637 + if (git_check_attr(path, ARRAY_SIZE(check), check))
638 return 0;
639 if (ATTR_FALSE(check->value))
640 return 1;
convert.c
+1 -1
@@ -727,7 +727,7 @@ static void convert_attrs(struct conv_attrs *ca, const char *path)
727 git_config(read_convert_config, NULL);
728 }
729
730 - if (!git_checkattr(path, NUM_CONV_ATTRS, ccheck)) {
730 + if (!git_check_attr(path, NUM_CONV_ATTRS, ccheck)) {
731 ca->crlf_action = git_path_check_crlf(path, ccheck + 4);
732 if (ca->crlf_action == CRLF_GUESS)
733 ca->crlf_action = git_path_check_crlf(path, ccheck + 0);
ll-merge.c
+2 -2
@@ -330,7 +330,7 @@ static int git_path_check_merge(const char *path, struct git_attr_check check[2]
330 check[0].attr = git_attr("merge");
331 check[1].attr = git_attr("conflict-marker-size");
332 }
333 - return git_checkattr(path, 2, check);
333 + return git_check_attr(path, 2, check);
334 }
335
336 static void normalize_file(mmfile_t *mm, const char *path)
@@ -387,7 +387,7 @@ int ll_merge_marker_size(const char *path)
387
388 if (!check.attr)
389 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) {
391 marker_size = atoi(check.value);
392 if (marker_size <= 0)
393 marker_size = DEFAULT_CONFLICT_MARKER_SIZE;
userdiff.c
+1 -1
@@ -270,7 +270,7 @@ struct userdiff_driver *userdiff_find_by_path(const char *path)
270
271 if (!path)
272 return NULL;
273 - if (git_checkattr(path, 1, &check))
273 + if (git_check_attr(path, 1, &check))
274 return NULL;
275
276 if (ATTR_TRUE(check.value))
ws.c
+1 -1
@@ -88,7 +88,7 @@ unsigned whitespace_rule(const char *pathname)
88 struct git_attr_check attr_whitespace_rule;
89
90 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)) {
92 const char *value;
93
94 value = attr_whitespace_rule.value;