diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2019-07-21 12:13:07 +0100 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-08-11 20:47:59 +0100 |
| commit | a5392eae3d40dc7789de581406e35a1ce7487e1e (patch) | |
| tree | e828d9e3207ee334361918bac58b7e705d9441b9 /src/blob.c | |
| parent | 22eb12afef4785fac47d56e2e8a13c840294ca4a (diff) | |
| download | libgit2-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 'src/blob.c')
| -rw-r--r-- | src/blob.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/blob.c b/src/blob.c index 1af3131ba..7db05f046 100644 --- a/src/blob.c +++ b/src/blob.c @@ -425,6 +425,9 @@ int git_blob_filter( git_blob_is_binary(blob)) return 0; + if ((opts.flags & GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES) != 0) + flags |= GIT_FILTER_NO_SYSTEM_ATTRIBUTES; + if (!(error = git_filter_list_load( &fl, git_blob_owner(blob), blob, path, GIT_FILTER_TO_WORKTREE, flags))) { |
