From a5392eae3d40dc7789de581406e35a1ce7487e1e Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 21 Jul 2019 12:13:07 +0100 Subject: 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. --- include/git2/blob.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/git2') 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; /** -- cgit v1.2.1