diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2011-08-04 06:36:23 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-04 15:53:18 -0700 |
commit | ee548df3005d976d4e6a78b3b4454fed812ea28c (patch) | |
tree | 8e961b3c8f30bdd1b89f4736902b755491d1ecad /attr.h | |
parent | 7373eab48e284a808cde766831172d3447f9e320 (diff) | |
download | git-ee548df3005d976d4e6a78b3b4454fed812ea28c.tar.gz |
Allow querying all attributes on a file
Add a function, git_all_attrs(), that reports on all attributes that
are set on a path.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'attr.h')
-rw-r--r-- | attr.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -38,6 +38,15 @@ char *git_attr_name(struct git_attr *); int git_checkattr(const char *path, int, struct git_attr_check *); +/* + * Retrieve all attributes that apply to the specified path. *num + * will be set the the number of attributes on the path; **check will + * be set to point at a newly-allocated array of git_attr_check + * objects describing the attributes and their values. *check must be + * free()ed by the caller. + */ +int git_all_attrs(const char *path, int *num, struct git_attr_check **check); + enum git_attr_direction { GIT_ATTR_CHECKIN, GIT_ATTR_CHECKOUT, |