git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Change funcname_pattern_ident to diff_attr
@ 2007-07-07 17:20 Johannes Schindelin
  0 siblings, 0 replies; only message in thread
From: Johannes Schindelin @ 2007-07-07 17:20 UTC (permalink / raw)
  To: git, gitster


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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-07 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-07 17:20 [PATCH 1/2] Change funcname_pattern_ident to diff_attr Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).