]> git.proxmox.com Git - libgit2.git/blob - src/filter.h
git_filter_opt_t -> git_filter_flag_t
[libgit2.git] / src / filter.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7 #ifndef INCLUDE_filter_h__
8 #define INCLUDE_filter_h__
9
10 #include "common.h"
11 #include "attr_file.h"
12 #include "git2/filter.h"
13
14 /* Amount of file to examine for NUL byte when checking binary-ness */
15 #define GIT_FILTER_BYTES_TO_CHECK_NUL 8000
16
17 /* Possible CRLF values */
18 typedef enum {
19 GIT_CRLF_GUESS = -1,
20 GIT_CRLF_BINARY = 0,
21 GIT_CRLF_TEXT,
22 GIT_CRLF_INPUT,
23 GIT_CRLF_CRLF,
24 GIT_CRLF_AUTO,
25 } git_crlf_t;
26
27 extern void git_filter_list__set_temp_buf(
28 git_filter_list *fl, git_buf *temp_buf);
29
30 extern void git_filter_free(git_filter *filter);
31
32 extern int git_filter_list__load_with_attr_session(
33 git_filter_list **filters,
34 git_repository *repo,
35 git_attr_session *attr_session,
36 git_blob *blob, /* can be NULL */
37 const char *path,
38 git_filter_mode_t mode,
39 uint32_t flags);
40
41 /*
42 * Available filters
43 */
44
45 extern git_filter *git_crlf_filter_new(void);
46 extern git_filter *git_ident_filter_new(void);
47
48 #endif