diff options
Diffstat (limited to 'diff.h')
-rw-r--r-- | diff.h | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -6,6 +6,7 @@ #include "tree-walk.h" #include "pathspec.h" +#include "object.h" struct rev_info; struct diff_options; @@ -90,6 +91,7 @@ typedef struct strbuf *(*diff_prefix_fn_t)(struct diff_options *opt, void *data) #define DIFF_OPT_DIRSTAT_BY_LINE (1 << 28) #define DIFF_OPT_FUNCCONTEXT (1 << 29) #define DIFF_OPT_PICKAXE_IGNORE_CASE (1 << 30) +#define DIFF_OPT_DEFAULT_FOLLOW_RENAMES (1U << 31) #define DIFF_OPT_TST(opts, flag) ((opts)->flags & DIFF_OPT_##flag) #define DIFF_OPT_TOUCHED(opts, flag) ((opts)->touched_flags & DIFF_OPT_##flag) @@ -137,6 +139,11 @@ struct diff_options { int dirstat_permille; int setup; int abbrev; +/* white-space error highlighting */ +#define WSEH_NEW 1 +#define WSEH_CONTEXT 2 +#define WSEH_OLD 4 + unsigned ws_error_highlight; const char *prefix; int prefix_length; const char *stat_sep; @@ -175,7 +182,7 @@ struct diff_options { enum color_diff { DIFF_RESET = 0, - DIFF_PLAIN = 1, + DIFF_CONTEXT = 1, DIFF_METAINFO = 2, DIFF_FRAGINFO = 3, DIFF_FILE_OLD = 4, @@ -207,11 +214,11 @@ struct combine_diff_path { struct combine_diff_path *next; char *path; unsigned int mode; - unsigned char sha1[20]; + struct object_id oid; struct combine_diff_parent { char status; unsigned int mode; - unsigned char sha1[20]; + struct object_id oid; } parent[FLEX_ARRAY]; }; #define combine_diff_path_size(n, l) \ @@ -261,7 +268,7 @@ extern int parse_long_opt(const char *opt, const char **argv, extern int git_diff_basic_config(const char *var, const char *value, void *cb); extern int git_diff_ui_config(const char *var, const char *value, void *cb); extern void diff_setup(struct diff_options *); -extern int diff_opt_parse(struct diff_options *, const char **, int); +extern int diff_opt_parse(struct diff_options *, const char **, int, const char *); extern void diff_setup_done(struct diff_options *); #define DIFF_DETECT_RENAME 1 @@ -338,7 +345,7 @@ extern int diff_flush_patch_id(struct diff_options *, unsigned char *); extern int diff_result_code(struct diff_options *, int); -extern void diff_no_index(struct rev_info *, int, const char **, const char *); +extern void diff_no_index(struct rev_info *, int, const char **); extern int index_differs_from(const char *def, int diff_flags); |