summaryrefslogtreecommitdiff
path: root/include/git2/sys
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-09-11 16:38:33 -0700
committerRussell Belfer <rb@github.com>2013-09-17 09:31:45 -0700
commit4b11f25a4fbb6952284e037a70e2d61fde841ab6 (patch)
tree41929ce26c3c41183b3fc221927afb67444eadf2 /include/git2/sys
parent40cb40fab93281c808255d980bbe81a18a4d9e9a (diff)
downloadlibgit2-4b11f25a4fbb6952284e037a70e2d61fde841ab6.tar.gz
Add ident filter
This adds the ident filter (that knows how to replace $Id$) and tweaks the filter APIs and code so that git_filter_source objects actually have the updated OID of the object being filtered when it is a known value.
Diffstat (limited to 'include/git2/sys')
-rw-r--r--include/git2/sys/filter.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/git2/sys/filter.h b/include/git2/sys/filter.h
index ca5738a53..c35fe55f6 100644
--- a/include/git2/sys/filter.h
+++ b/include/git2/sys/filter.h
@@ -26,7 +26,11 @@ GIT_BEGIN_DECL
*/
GIT_EXTERN(git_filter *) git_filter_lookup(const char *name);
-#define GIT_FILTER_CRLF "crlf"
+#define GIT_FILTER_CRLF "crlf"
+#define GIT_FILTER_IDENT "ident"
+
+#define GIT_FILTER_CRLF_PRIORITY 0
+#define GIT_FILTER_IDENT_PRIORITY 100
/**
* Create a new empty filter list
@@ -199,8 +203,9 @@ struct git_filter {
* issued in order of `priority` on smudge (to workdir), and in reverse
* order of `priority` on clean (to odb).
*
- * One filter will be preregistered with libgit2:
- * - GIT_FILTER_CRLF with priority of 0.
+ * Two filters are preregistered with libgit2:
+ * - GIT_FILTER_CRLF with priority 0
+ * - GIT_FILTER_IDENT with priority 100
*
* Currently the filter registry is not thread safe, so any registering or
* deregistering of filters must be done outside of any possible usage of