diff options
Diffstat (limited to 'attr.h')
| -rw-r--r-- | attr.h | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -45,7 +45,7 @@ * const char *path; * * setup_check(); - * git_check_attr(path, check); + * git_check_attr(&the_index, path, check); * ------------ * * - Act on `.value` member of the result, left in `check->items[]`: @@ -107,6 +107,18 @@ * - Free the `attr_check` struct by calling `attr_check_free()`. */ +/** + * The maximum line length for a gitattributes file. If the line exceeds this + * length we will ignore it. + */ +#define ATTR_MAX_LINE_LENGTH 2048 + + /** + * The maximum size of the giattributes file. If the file exceeds this size we + * will ignore it. + */ +#define ATTR_MAX_FILE_SIZE (100 * 1024 * 1024) + struct index_state; /** @@ -123,6 +135,12 @@ struct all_attrs_item; struct attr_stack; /* + * The textual object name for the tree-ish used by git_check_attr() + * to read attributes from (instead of from the working tree). + */ +void set_git_attr_source(const char *); + +/* * Given a string, return the gitattribute object that * corresponds to it. */ @@ -190,7 +208,8 @@ void attr_check_free(struct attr_check *check); const char *git_attr_name(const struct git_attr *); void git_check_attr(struct index_state *istate, - const char *path, struct attr_check *check); + const char *path, + struct attr_check *check); /* * Retrieve all attributes that apply to the specified path. |
