summaryrefslogtreecommitdiff
path: root/include/git2/attr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/attr.h')
-rw-r--r--include/git2/attr.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/git2/attr.h b/include/git2/attr.h
index d585937b..f4c5975a 100644
--- a/include/git2/attr.h
+++ b/include/git2/attr.h
@@ -50,6 +50,30 @@ GIT_EXTERN(int) git_attr_foreach(
int (*callback)(const char *name, const char *value, void *payload),
void *payload);
+/**
+ * Flush the gitattributes cache.
+ *
+ * Call this if you have reason to believe that the attributes files
+ * on disk no longer match the cached contents of memory.
+ */
+GIT_EXTERN(void) git_attr_cache_flush(
+ git_repository *repo);
+
+/**
+ * Add a macro definition.
+ *
+ * Macros will automatically be loaded from the top level .gitattributes
+ * file of the repository (plus the build-in "binary" macro). This
+ * function allows you to add others. For example, to add the default
+ * macro, you would call:
+ *
+ * git_attr_add_macro(repo, "binary", "-diff -crlf");
+ */
+GIT_EXTERN(int) git_attr_add_macro(
+ git_repository *repo,
+ const char *name,
+ const char *values);
+
/** @} */
GIT_END_DECL
#endif