summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ca64d06)
raw | patch | inline | side by side (parent: ca64d06)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Thu, 4 Aug 2011 04:36:33 +0000 (06:36 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 4 Aug 2011 22:53:21 +0000 (15:53 -0700) |
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>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/api-gitattributes.txt | patch | blob | history | |
archive.c | patch | blob | history | |
attr.c | patch | blob | history | |
attr.h | patch | blob | history | |
builtin/check-attr.c | patch | blob | history | |
builtin/pack-objects.c | patch | blob | history | |
convert.c | patch | blob | history | |
ll-merge.c | patch | blob | history | |
userdiff.c | patch | blob | history | |
ws.c | patch | blob | history |
diff --git a/Documentation/technical/api-gitattributes.txt b/Documentation/technical/api-gitattributes.txt
index 16ccb1cdc38f4a487131fbbaa9a31dfa08dc2dea..ce363b6305ec117810d66308b0066814871f54e1 100644 (file)
`struct git_attr_check`::
This structure represents a set of attributes to check in a call
- to `git_checkattr()` function, and receives the results.
+ to `git_check_attr()` function, and receives the results.
Attribute Values
attributes you would want to check. To populate this array, you would
need to define necessary attributes by calling `git_attr()` function.
-* Call `git_checkattr()` to check the attributes for the path.
+* Call `git_check_attr()` to check the attributes for the path.
* Inspect `git_attr_check` structure to see how each of the attribute in
the array is defined for the path.
}
------------
-. Call `git_checkattr()` with the prepared array of `struct git_attr_check`:
+. Call `git_check_attr()` with the prepared array of `struct git_attr_check`:
------------
const char *path;
setup_check();
- git_checkattr(path, ARRAY_SIZE(check), check);
+ git_check_attr(path, ARRAY_SIZE(check), check);
------------
. Act on `.value` member of the result, left in `check[]`:
diff --git a/archive.c b/archive.c
index 2a7a28e3ed35fe9db03ccf70b71867f7f8a22b8e..3fd7f475f1d8ff5efe602a10f02ea3e1c3aa9edd 100644 (file)
--- a/archive.c
+++ b/archive.c
path_without_prefix = path.buf + args->baselen;
setup_archive_check(check);
- if (!git_checkattr(path_without_prefix, ARRAY_SIZE(check), check)) {
+ if (!git_check_attr(path_without_prefix, ARRAY_SIZE(check), check)) {
if (ATTR_TRUE(check[0].value))
return 0;
convert = ATTR_TRUE(check[1].value);
index 658112eeb6c975f290b703ac29527c8d09b09175..da29c8eb452af6a0a07829ab1ed2409c8aea5ef2 100644 (file)
--- a/attr.c
+++ b/attr.c
rem = fill(path, pathlen, stk, rem);
}
-int git_checkattr(const char *path, int num, struct git_attr_check *check)
+int git_check_attr(const char *path, int num, struct git_attr_check *check)
{
int i;
index 9e228933a54b7c786d017eaa1027607fa09f09d3..eb8ca0d7c067417a8ff2802179e50bddcdff3367 100644 (file)
--- a/attr.h
+++ b/attr.h
#define ATTR_UNSET(v) ((v) == NULL)
/*
- * Send one or more git_attr_check to git_checkattr(), and
+ * Send one or more git_attr_check to git_check_attr(), and
* each 'value' member tells what its value is.
* Unset one is returned as NULL.
*/
*/
char *git_attr_name(struct git_attr *);
-int git_checkattr(const char *path, int, struct git_attr_check *);
+int git_check_attr(const char *path, int, struct git_attr_check *);
/*
* Retrieve all attributes that apply to the specified path. *num
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index f20772ad6e3feee8643867520d1f37eca35efad2..6b163687b6c5c236b11a8677ddb212aa862e6bb8 100644 (file)
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
const char *file)
{
if (check != NULL) {
- if (git_checkattr(file, cnt, check))
- die("git_checkattr died");
+ if (git_check_attr(file, cnt, check))
+ die("git_check_attr died");
output_attr(cnt, check, file);
} else {
if (git_all_attrs(file, &cnt, &check))
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 84e6dafb12657a6f0431f2a287d0cca976269c35..ac8bed8aa1a704e81192b43beb5fe1ca5b805e85 100644 (file)
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
struct git_attr_check check[1];
setup_delta_attr_check(check);
- if (git_checkattr(path, ARRAY_SIZE(check), check))
+ if (git_check_attr(path, ARRAY_SIZE(check), check))
return 0;
if (ATTR_FALSE(check->value))
return 1;
diff --git a/convert.c b/convert.c
index 85939c29be67d4179a2afb9069b575afed4d8bb2..416bf83c75510930146dc0e3c2dd3273a9cb4e33 100644 (file)
--- a/convert.c
+++ b/convert.c
git_config(read_convert_config, NULL);
}
- if (!git_checkattr(path, NUM_CONV_ATTRS, ccheck)) {
+ if (!git_check_attr(path, NUM_CONV_ATTRS, ccheck)) {
ca->crlf_action = git_path_check_crlf(path, ccheck + 4);
if (ca->crlf_action == CRLF_GUESS)
ca->crlf_action = git_path_check_crlf(path, ccheck + 0);
diff --git a/ll-merge.c b/ll-merge.c
index 6ce512efc4cce8042481e8a6947d033c272e78e6..da59738c9b787ae082ad062a91345a60628e704a 100644 (file)
--- a/ll-merge.c
+++ b/ll-merge.c
@@ -330,7 +330,7 @@ static int git_path_check_merge(const char *path, struct git_attr_check check[2]
check[0].attr = git_attr("merge");
check[1].attr = git_attr("conflict-marker-size");
}
- return git_checkattr(path, 2, check);
+ return git_check_attr(path, 2, check);
}
static void normalize_file(mmfile_t *mm, const char *path)
if (!check.attr)
check.attr = git_attr("conflict-marker-size");
- if (!git_checkattr(path, 1, &check) && check.value) {
+ if (!git_check_attr(path, 1, &check) && check.value) {
marker_size = atoi(check.value);
if (marker_size <= 0)
marker_size = DEFAULT_CONFLICT_MARKER_SIZE;
diff --git a/userdiff.c b/userdiff.c
index 01d3a8b81e628b0a088e3e9fc0ca59acf7d9c58d..bf553ad91b55de8a762d56a6ffc6c86e959e878c 100644 (file)
--- a/userdiff.c
+++ b/userdiff.c
if (!path)
return NULL;
- if (git_checkattr(path, 1, &check))
+ if (git_check_attr(path, 1, &check))
return NULL;
if (ATTR_TRUE(check.value))
index 9fb9b14760b100972a1adb5198bff9d6a9941808..b498d7599d5ac09c2688ee829b29aa36a866ac9c 100644 (file)
--- a/ws.c
+++ b/ws.c
struct git_attr_check attr_whitespace_rule;
setup_whitespace_attr_check(&attr_whitespace_rule);
- if (!git_checkattr(pathname, 1, &attr_whitespace_rule)) {
+ if (!git_check_attr(pathname, 1, &attr_whitespace_rule)) {
const char *value;
value = attr_whitespace_rule.value;