From 352404ac4ccab144cd866b1f24c90b8f29ca33c2 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Thu, 4 Aug 2011 06:36:17 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- attr.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'attr.h') diff --git a/attr.h b/attr.h index 8b3f19be6..d4f875a3d 100644 --- a/attr.h +++ b/attr.h @@ -29,6 +29,13 @@ struct git_attr_check { const char *value; }; +/* + * Return the name of the attribute represented by the argument. The + * return value is a pointer to a null-delimited string that is part + * of the internal data structure; it should not be modified or freed. + */ +char *git_attr_name(struct git_attr *); + int git_checkattr(const char *path, int, struct git_attr_check *); enum git_attr_direction { -- cgit v1.2.1