summaryrefslogtreecommitdiff
path: root/include/git2/sys
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-08-30 16:02:07 -0700
committerRussell Belfer <rb@github.com>2013-09-17 09:30:06 -0700
commit570ba25cb0f757f993e06df629faced32fdf2f8f (patch)
treeb5d6e90929837ebfbcebb83c3aa40c29f6baf2a4 /include/git2/sys
parent85d5481206a932d747b2d5587b6d4c7f69993ba6 (diff)
downloadlibgit2-570ba25cb0f757f993e06df629faced32fdf2f8f.tar.gz
Make git_filter_source opaque
Diffstat (limited to 'include/git2/sys')
-rw-r--r--include/git2/sys/filter.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/include/git2/sys/filter.h b/include/git2/sys/filter.h
index 2264be080..b1193a538 100644
--- a/include/git2/sys/filter.h
+++ b/include/git2/sys/filter.h
@@ -22,12 +22,29 @@ GIT_BEGIN_DECL
* A filter source represents a file/blob to be processed
*/
typedef struct git_filter_source git_filter_source;
-struct git_filter_source {
- git_repository *repo;
- const char *path;
- git_oid oid; /* zero if unknown (which is likely) */
- uint16_t filemode; /* zero if unknown */
-};
+
+/**
+ * Get the repository that the source data is coming from.
+ */
+GIT_EXTERN(git_repository *) git_filter_source_repo(const git_filter_source *src);
+
+/**
+ * Get the path that the source data is coming from.
+ */
+GIT_EXTERN(const char *) git_filter_source_path(const git_filter_source *src);
+
+/**
+ * Get the file mode of the source file
+ * If the mode is unknown, this will return 0
+ */
+GIT_EXTERN(uint16_t) git_filter_source_filemode(const git_filter_source *src);
+
+/**
+ * Get the OID of the source
+ * If the OID is unknown (often the case with GIT_FILTER_CLEAN) then
+ * this will return NULL.
+ */
+GIT_EXTERN(const git_oid *) git_filter_source_id(const git_filter_source *src);
/**
* Callback to actually perform the data filtering