Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/userdiff.h # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / userdiff.h` 61 lines ยท 1584 bytes Raw Blame History 1 #ifndef USERDIFF_H 2 #define USERDIFF_H 3 4 #include "notes-cache.h" 5 6 struct index_state; 7 struct repository; 8 9 struct userdiff_funcname { 10 const char *pattern; 11 char *pattern_owned; 12 int cflags; 13 }; 14 15 struct external_diff { 16 char *cmd; 17 unsigned trust_exit_code:1; 18 }; 19 20 struct userdiff_driver { 21 const char *name; 22 struct external_diff external; 23 const char *algorithm; 24 char *algorithm_owned; 25 int binary; 26 struct userdiff_funcname funcname; 27 const char *word_regex; 28 char *word_regex_owned; 29 const char *word_regex_multi_byte; 30 const char *textconv; 31 char *textconv_owned; 32 struct notes_cache *textconv_cache; 33 int textconv_want_cache; 34 }; 35 enum userdiff_driver_type { 36 USERDIFF_DRIVER_TYPE_BUILTIN = 1<<0, 37 USERDIFF_DRIVER_TYPE_CUSTOM = 1<<1, 38 }; 39 typedef int (*each_userdiff_driver_fn)(struct userdiff_driver *, 40 enum userdiff_driver_type, void *); 41 42 int userdiff_config(const char *k, const char *v); 43 struct userdiff_driver *userdiff_find_by_name(const char *name); 44 struct userdiff_driver *userdiff_find_by_path(struct index_state *istate, 45 const char *path); 46 47 /* 48 * Initialize any textconv-related fields in the driver and return it, or NULL 49 * if it does not have textconv enabled at all. 50 */ 51 struct userdiff_driver *userdiff_get_textconv(struct repository *r, 52 struct userdiff_driver *driver); 53 54 /* 55 * Iterate over all userdiff drivers. The userdiff_driver_type 56 * argument to each_userdiff_driver_fn indicates their type. Return 57 * non-zero to exit early from the loop. 58 */ 59 int for_each_userdiff_driver(each_userdiff_driver_fn, void *); 60 61 #endif /* USERDIFF */