diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/attr.c | 10 | ||||
-rw-r--r-- | src/crlf.c | 8 | ||||
-rw-r--r-- | src/diff_driver.c | 6 | ||||
-rw-r--r-- | src/filter.c | 4 | ||||
-rw-r--r-- | src/merge_driver.c | 8 |
5 files changed, 18 insertions, 18 deletions
diff --git a/src/attr.c b/src/attr.c index c6867e161..bd8e415cc 100644 --- a/src/attr.c +++ b/src/attr.c @@ -19,18 +19,18 @@ const char *git_attr__true = "[internal]__TRUE__"; const char *git_attr__false = "[internal]__FALSE__"; const char *git_attr__unset = "[internal]__UNSET__"; -git_attr_t git_attr_value(const char *attr) +git_attr_value_t git_attr_value(const char *attr) { if (attr == NULL || attr == git_attr__unset) - return GIT_ATTR_UNSPECIFIED_T; + return GIT_ATTR_VALUE_UNSPECIFIED; if (attr == git_attr__true) - return GIT_ATTR_TRUE_T; + return GIT_ATTR_VALUE_TRUE; if (attr == git_attr__false) - return GIT_ATTR_FALSE_T; + return GIT_ATTR_VALUE_FALSE; - return GIT_ATTR_VALUE_T; + return GIT_ATTR_VALUE_STRING; } static int collect_attr_files( diff --git a/src/crlf.c b/src/crlf.c index 80441e7e3..6e8eaa960 100644 --- a/src/crlf.c +++ b/src/crlf.c @@ -44,11 +44,11 @@ struct crlf_filter { static git_crlf_t check_crlf(const char *value) { - if (GIT_ATTR_TRUE(value)) + if (GIT_ATTR_IS_TRUE(value)) return GIT_CRLF_TEXT; - else if (GIT_ATTR_FALSE(value)) + else if (GIT_ATTR_IS_FALSE(value)) return GIT_CRLF_BINARY; - else if (GIT_ATTR_UNSPECIFIED(value)) + else if (GIT_ATTR_IS_UNSPECIFIED(value)) ; else if (strcmp(value, "input") == 0) return GIT_CRLF_TEXT_INPUT; @@ -60,7 +60,7 @@ static git_crlf_t check_crlf(const char *value) static git_cvar_value check_eol(const char *value) { - if (GIT_ATTR_UNSPECIFIED(value)) + if (GIT_ATTR_IS_UNSPECIFIED(value)) ; else if (strcmp(value, "lf") == 0) return GIT_EOL_LF; diff --git a/src/diff_driver.c b/src/diff_driver.c index 740b5c9a3..6919e4e61 100644 --- a/src/diff_driver.c +++ b/src/diff_driver.c @@ -371,11 +371,11 @@ int git_diff_driver_lookup( attrsession, 0, path, 1, attrs)) < 0) /* return error below */; - else if (GIT_ATTR_UNSPECIFIED(values[0])) + else if (GIT_ATTR_IS_UNSPECIFIED(values[0])) /* just use the auto value */; - else if (GIT_ATTR_FALSE(values[0])) + else if (GIT_ATTR_IS_FALSE(values[0])) *out = &global_drivers[DIFF_DRIVER_BINARY]; - else if (GIT_ATTR_TRUE(values[0])) + else if (GIT_ATTR_IS_TRUE(values[0])) *out = &global_drivers[DIFF_DRIVER_TEXT]; /* otherwise look for driver information in config and build driver */ diff --git a/src/filter.c b/src/filter.c index 96c27fdf8..34e2dfa17 100644 --- a/src/filter.c +++ b/src/filter.c @@ -445,7 +445,7 @@ static int filter_list_check_attributes( for (i = 0; !error && i < fdef->nattrs; ++i) { const char *want = fdef->attrs[fdef->nattrs + i]; - git_attr_t want_type, found_type; + git_attr_value_t want_type, found_type; if (!want) continue; @@ -455,7 +455,7 @@ static int filter_list_check_attributes( if (want_type != found_type) error = GIT_ENOTFOUND; - else if (want_type == GIT_ATTR_VALUE_T && + else if (want_type == GIT_ATTR_VALUE_STRING && strcmp(want, strs[i]) && strcmp(want, "*")) error = GIT_ENOTFOUND; diff --git a/src/merge_driver.c b/src/merge_driver.c index 8b7e3559a..a529aefda 100644 --- a/src/merge_driver.c +++ b/src/merge_driver.c @@ -371,17 +371,17 @@ static int merge_driver_name_for_path( return error; /* set: use the built-in 3-way merge driver ("text") */ - if (GIT_ATTR_TRUE(value)) + if (GIT_ATTR_IS_TRUE(value)) *out = merge_driver_name__text; /* unset: do not merge ("binary") */ - else if (GIT_ATTR_FALSE(value)) + else if (GIT_ATTR_IS_FALSE(value)) *out = merge_driver_name__binary; - else if (GIT_ATTR_UNSPECIFIED(value) && default_driver) + else if (GIT_ATTR_IS_UNSPECIFIED(value) && default_driver) *out = default_driver; - else if (GIT_ATTR_UNSPECIFIED(value)) + else if (GIT_ATTR_IS_UNSPECIFIED(value)) *out = merge_driver_name__text; else |