summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-08-04 06:36:17 +0200
committerJunio C Hamano <gitster@pobox.com>2011-08-04 15:53:16 -0700
commit352404ac4ccab144cd866b1f24c90b8f29ca33c2 (patch)
tree26834953b4e6c72abaa9e1e6d4e1da42b10a191d /attr.c
parent09d7dd7ad62fef60fc223fa74eb04c8dc783c2f6 (diff)
downloadgit-352404ac4ccab144cd866b1f24c90b8f29ca33c2.tar.gz
Provide access to the name attribute of git_attr
It will be present in any likely future reimplementation, and its availability simplifies other code. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'attr.c')
-rw-r--r--attr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/attr.c b/attr.c
index b1d1d6d791..bfa1f43793 100644
--- a/attr.c
+++ b/attr.c
@@ -36,6 +36,11 @@ static int attr_nr;
static struct git_attr_check *check_all_attr;
static struct git_attr *(git_attr_hash[HASHSIZE]);
+char *git_attr_name(struct git_attr *attr)
+{
+ return attr->name;
+}
+
static unsigned hash_name(const char *name, int namelen)
{
unsigned val = 0, c;