From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: git@vger.kernel.org, gitster@pobox.com
Subject: [PATCH 1/2] Change funcname_pattern_ident to diff_attr
Date: Sat, 7 Jul 2007 18:20:57 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0707071820270.4093@racer.site> (raw)
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
reply other threads:[~2007-07-07 17:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0707071820270.4093@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).