Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

0 notes on commit d932f4e

Please sign in to comment.
Something went wrong with that request. Please try again.