1 module deimos.git2.filter; 2 3 import deimos.git2.common; 4 import deimos.git2.types; 5 import deimos.git2.oid; 6 import deimos.git2.buffer; 7 8 enum git_filter_mode_t { 9 GIT_FILTER_TO_WORKTREE = 0, 10 GIT_FILTER_SMUDGE = GIT_FILTER_TO_WORKTREE, 11 GIT_FILTER_TO_ODB = 1, 12 GIT_FILTER_CLEAN = GIT_FILTER_TO_ODB, 13 } 14 15 enum git_filter_flag_t { 16 GIT_FILTER_DEFAULT = 0u, 17 GIT_FILTER_ALLOW_UNSAFE = (1u << 0), 18 } 19 20 struct git_filter { 21 @disable this(); 22 @disable this(this); 23 } 24 25 struct git_filter_list { 26 @disable this(); 27 @disable this(this); 28 } 29 30 int git_filter_list_load( 31 git_filter_list **filters, 32 git_repository *repo, 33 git_blob *blob, 34 const(char)* path, 35 git_filter_mode_t mode, 36 uint flags); 37 int git_filter_list_apply_to_data( 38 git_buf *out_, 39 git_filter_list *filters, 40 git_buf *in_); 41 int git_filter_list_apply_to_file( 42 git_buf *out_, 43 git_filter_list *filters, 44 git_repository *repo, 45 const(char)* path); 46 int git_filter_list_apply_to_blob( 47 git_buf *out_, 48 git_filter_list *filters, 49 git_blob *blob); 50 int git_filter_list_stream_data( 51 git_filter_list *filters, 52 git_buf *data, 53 git_writestream *target); 54 int git_filter_list_stream_file( 55 git_filter_list *filters, 56 git_repository *repo, 57 const(char)* path, 58 git_writestream *target); 59 int git_filter_list_stream_blob( 60 git_filter_list *filters, 61 git_blob *blob, 62 git_writestream *target); 63 64 void git_filter_list_free(git_filter_list *filters);