git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] Change funcname_pattern_ident to diff_attr

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 7, 2007, 17:20 UTC
Message-ID
<Pine.LNX.4.64.0707071820270.4093@racer.site>

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@gmx.de>
---
	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
Message 1 of 1 in “Change funcname_pattern_ident to diff_attr”
  1. 1/2 Change funcname_pattern_ident to diff_attrJohannes Schindelin, Jul 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.