What we store in diff_filespec_check_attr() is really what is specified in the diff attribute. So better use the name "diff_attr". Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx> --- These two patches are on top of "Fix configuration syntax..." diff.c | 13 ++++--------- diffcore.h | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/diff.c b/diff.c index e92db5c..a5444df 100644 --- a/diff.c +++ b/diff.c @@ -1168,7 +1168,7 @@ static void diff_filespec_check_attr(struct diff_filespec *one) setup_diff_attr_check(&attr_diff_check); one->is_binary = 0; - one->funcname_pattern_ident = NULL; + one->diff_attr = NULL; if (!one->data && DIFF_FILE_VALID(one)) diff_populate_filespec(one, 0); @@ -1179,18 +1179,13 @@ static void diff_filespec_check_attr(struct diff_filespec *one) if (!git_checkattr(one->path, 1, &attr_diff_check)) { const char *value; - /* binaryness */ value = attr_diff_check.value; if (ATTR_TRUE(value)) one->is_binary = 0; else if (ATTR_FALSE(value)) one->is_binary = 1; - - /* funcname pattern ident */ - if (ATTR_TRUE(value) || ATTR_FALSE(value) || ATTR_UNSET(value)) - ; - else - one->funcname_pattern_ident = value; + else if (!ATTR_UNSET(value)) + one->diff_attr = value; } } @@ -1216,7 +1211,7 @@ static const char *diff_funcname_pattern(struct diff_filespec *one) const char *ident, *pattern; diff_filespec_check_attr(one); - ident = one->funcname_pattern_ident; + ident = one->diff_attr; if (!ident) /* diff --git a/diffcore.h b/diffcore.h index eef17c4..f905bf5 100644 --- a/diffcore.h +++ b/diffcore.h @@ -27,7 +27,7 @@ struct diff_filespec { char *path; void *data; void *cnt_data; - const char *funcname_pattern_ident; + const char *diff_attr; unsigned long size; int xfrm_flags; /* for use by the xfrm */ unsigned short mode; /* file mode */ -- 1.5.3.rc0.2712.g125b7f - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html