summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-07-21 12:13:07 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2019-08-11 20:47:59 +0100
commita5392eae3d40dc7789de581406e35a1ce7487e1e (patch)
treee828d9e3207ee334361918bac58b7e705d9441b9 /include
parent22eb12afef4785fac47d56e2e8a13c840294ca4a (diff)
downloadlibgit2-a5392eae3d40dc7789de581406e35a1ce7487e1e.tar.gz
blob: allow blob filtering to ignore system gitattributes
Introduce `GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES`, which tells `git_blob_filter` to ignore the system-wide attributes file, usually `/etc/gitattributes`. This simply passes the appropriate flag to the attribute loading code.
Diffstat (limited to 'include')
-rw-r--r--include/git2/blob.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/git2/blob.h b/include/git2/blob.h
index 3710f41bf..923bcf677 100644
--- a/include/git2/blob.h
+++ b/include/git2/blob.h
@@ -102,6 +102,12 @@ GIT_EXTERN(git_off_t) git_blob_rawsize(const git_blob *blob);
typedef enum {
/** When set, filters will not be applied to binary files. */
GIT_BLOB_FILTER_CHECK_FOR_BINARY = (1 << 0),
+
+ /**
+ * When set, filters will not load configuration from the
+ * system-wide `gitattributes` in `/etc` (or system equivalent).
+ */
+ GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES = (1 << 1),
} git_blob_filter_flag_t;
/**