{"thread":{"id":"8918","subject":"[PATCH 1/2] Change funcname_pattern_ident to diff_attr","startedAt":"2007-07-07T17:20:57Z","lastAt":"2007-07-07T17:20:57Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"46700","messageId":"Pine.LNX.4.64.0707071820270.4093@racer.site","threadId":"8918","inReplyTo":null,"subject":"[PATCH 1/2] Change funcname_pattern_ident to diff_attr","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-07T17:20:57Z","receivedAt":"2007-07-07T17:20:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nWhat we store in diff_filespec_check_attr() is really what is specified\nin the diff attribute.  So better use the name \"diff_attr\".\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tThese two patches are on top of \"Fix configuration syntax...\"\n\n diff.c     |   13 ++++---------\n diffcore.h |    2 +-\n 2 files changed, 5 insertions(+), 10 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex e92db5c..a5444df 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1168,7 +1168,7 @@ static void diff_filespec_check_attr(struct diff_filespec *one)\n \n \tsetup_diff_attr_check(&attr_diff_check);\n \tone->is_binary = 0;\n-\tone->funcname_pattern_ident = NULL;\n+\tone->diff_attr = NULL;\n \n \tif (!one->data && DIFF_FILE_VALID(one))\n \t\tdiff_populate_filespec(one, 0);\n@@ -1179,18 +1179,13 @@ static void diff_filespec_check_attr(struct diff_filespec *one)\n \tif (!git_checkattr(one->path, 1, &attr_diff_check)) {\n \t\tconst char *value;\n \n-\t\t/* binaryness */\n \t\tvalue = attr_diff_check.value;\n \t\tif (ATTR_TRUE(value))\n \t\t\tone->is_binary = 0;\n \t\telse if (ATTR_FALSE(value))\n \t\t\tone->is_binary = 1;\n-\n-\t\t/* funcname pattern ident */\n-\t\tif (ATTR_TRUE(value) || ATTR_FALSE(value) || ATTR_UNSET(value))\n-\t\t\t;\n-\t\telse\n-\t\t\tone->funcname_pattern_ident = value;\n+\t\telse if (!ATTR_UNSET(value))\n+\t\t\tone->diff_attr = value;\n \t}\n }\n \n@@ -1216,7 +1211,7 @@ static const char *diff_funcname_pattern(struct diff_filespec *one)\n \tconst char *ident, *pattern;\n \n \tdiff_filespec_check_attr(one);\n-\tident = one->funcname_pattern_ident;\n+\tident = one->diff_attr;\n \n \tif (!ident)\n \t\t/*\ndiff --git a/diffcore.h b/diffcore.h\nindex eef17c4..f905bf5 100644\n--- a/diffcore.h\n+++ b/diffcore.h\n@@ -27,7 +27,7 @@ struct diff_filespec {\n \tchar *path;\n \tvoid *data;\n \tvoid *cnt_data;\n-\tconst char *funcname_pattern_ident;\n+\tconst char *diff_attr;\n \tunsigned long size;\n \tint xfrm_flags;\t\t /* for use by the xfrm */\n \tunsigned short mode;\t /* file mode */\n-- \n1.5.3.rc0.2712.g125b7f\n"}]}