diff options
author | Russell Belfer <rb@github.com> | 2013-09-15 22:23:39 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-09-17 09:31:46 -0700 |
commit | eab3746b3026950ed62842c1e5641556d7131a5b (patch) | |
tree | aa9b33b4a10b6e70db3daf9b79831a959f3fbb4c /include/git2/sys/filter.h | |
parent | 37f9e4093999498a25641018da36245d6a7cb008 (diff) | |
download | libgit2-eab3746b3026950ed62842c1e5641556d7131a5b.tar.gz |
More filtering tests including order
This adds more tests of filters, including the ident filter when
mixed with custom filters. I was able to combine with the reverse
filter and demonstrate that the order of filter application with
the default priority constants matches the order of core Git.
Also, this fixes two issues in the ident filter: preventing ident
expansion on binary files and avoiding a NULL dereference when
dollar sign characters are found without Id.
Diffstat (limited to 'include/git2/sys/filter.h')
-rw-r--r-- | include/git2/sys/filter.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/git2/sys/filter.h b/include/git2/sys/filter.h index 9a6720a3e..aa89c7b56 100644 --- a/include/git2/sys/filter.h +++ b/include/git2/sys/filter.h @@ -29,10 +29,24 @@ GIT_EXTERN(git_filter *) git_filter_lookup(const char *name); #define GIT_FILTER_CRLF "crlf" #define GIT_FILTER_IDENT "ident" +/** + * This is priority that the internal CRLF filter will be registered with + */ #define GIT_FILTER_CRLF_PRIORITY 0 + +/** + * This is priority that the internal ident filter will be registered with + */ #define GIT_FILTER_IDENT_PRIORITY 100 /** + * This is priority to use with a custom filter to imitate a core Git + * filter driver, so that it will be run last on checkout and first on + * checkin. You do not have to use this, but it helps compatibility. + */ +#define GIT_FILTER_DRIVER_PRIORITY 200 + +/** * Create a new empty filter list * * Normally you won't use this because `git_filter_list_load` will create |