Commit | Line | Data |
---|---|---|
d0bfd026 JH |
1 | #ifndef ATTR_H |
2 | #define ATTR_H | |
3 | ||
4 | /* An attribute is a pointer to this opaque structure */ | |
5 | struct git_attr; | |
6 | ||
7 | struct git_attr *git_attr(const char *, int); | |
8 | ||
515106fa JH |
9 | /* Internal use */ |
10 | #define ATTR__TRUE ((void *) 1) | |
11 | #define ATTR__FALSE ((void *) 0) | |
12 | #define ATTR__UNSET ((void *) -1) | |
13 | ||
14 | /* For public to check git_attr_check results */ | |
15 | #define ATTR_TRUE(v) ((v) == ATTR__TRUE) | |
16 | #define ATTR_FALSE(v) ((v) == ATTR__FALSE) | |
17 | #define ATTR_UNSET(v) ((v) == ATTR__UNSET) | |
18 | ||
d0bfd026 JH |
19 | struct git_attr_check { |
20 | struct git_attr *attr; | |
515106fa | 21 | void *value; |
d0bfd026 JH |
22 | }; |
23 | ||
24 | int git_checkattr(const char *path, int, struct git_attr_check *); | |
25 | ||
26 | #endif /* ATTR_H */ |