#define DIFF_FLAGS_INIT { 0 }
struct diff_flags {
- unsigned RECURSIVE:1;
- unsigned TREE_IN_RECURSIVE:1;
- unsigned BINARY:1;
- unsigned TEXT:1;
- unsigned FULL_INDEX:1;
- unsigned SILENT_ON_REMOVE:1;
- unsigned FIND_COPIES_HARDER:1;
- unsigned FOLLOW_RENAMES:1;
- unsigned RENAME_EMPTY:1;
- unsigned HAS_CHANGES:1;
- unsigned QUICK:1;
- unsigned NO_INDEX:1;
- unsigned ALLOW_EXTERNAL:1;
- unsigned EXIT_WITH_STATUS:1;
- unsigned REVERSE_DIFF:1;
- unsigned CHECK_FAILED:1;
- unsigned RELATIVE_NAME:1;
- unsigned IGNORE_SUBMODULES:1;
- unsigned DIRSTAT_CUMULATIVE:1;
- unsigned DIRSTAT_BY_FILE:1;
- unsigned ALLOW_TEXTCONV:1;
- unsigned TEXTCONV_SET_VIA_CMDLINE:1;
- unsigned DIFF_FROM_CONTENTS:1;
- unsigned DIRTY_SUBMODULES:1;
- unsigned IGNORE_UNTRACKED_IN_SUBMODULES:1;
- unsigned IGNORE_DIRTY_SUBMODULES:1;
- unsigned OVERRIDE_SUBMODULE_CONFIG:1;
- unsigned DIRSTAT_BY_LINE:1;
- unsigned FUNCCONTEXT:1;
- unsigned PICKAXE_IGNORE_CASE:1;
- unsigned DEFAULT_FOLLOW_RENAMES:1;
+ unsigned recursive:1;
+ unsigned tree_in_recursive:1;
+ unsigned binary:1;
+ unsigned text:1;
+ unsigned full_index:1;
+ unsigned silent_on_remove:1;
+ unsigned find_copies_harder:1;
+ unsigned follow_renames:1;
+ unsigned rename_empty:1;
+ unsigned has_changes:1;
+ unsigned quick:1;
+ unsigned no_index:1;
+ unsigned allow_external:1;
+ unsigned exit_with_status:1;
+ unsigned reverse_diff:1;
+ unsigned check_failed:1;
+ unsigned relative_name:1;
+ unsigned ignore_submodules:1;
+ unsigned dirstat_cumulative:1;
+ unsigned dirstat_by_file:1;
+ unsigned allow_textconv:1;
+ unsigned textconv_set_via_cmdline:1;
+ unsigned diff_from_contents:1;
+ unsigned dirty_submodules:1;
+ unsigned ignore_untracked_in_submodules:1;
+ unsigned ignore_dirty_submodules:1;
+ unsigned override_submodule_config:1;
+ unsigned dirstat_by_line:1;
+ unsigned funccontext:1;
+ unsigned pickaxe_ignore_case:1;
+ unsigned default_follow_renames:1;
};
static inline void diff_flags_or(struct diff_flags *a,
tmp_a[i] |= tmp_b[i];
}
-#define DIFF_OPT_SET(opts, flag) ((opts)->flags.flag = 1)
-#define DIFF_OPT_CLR(opts, flag) ((opts)->flags.flag = 0)
-
#define DIFF_XDL_TST(opts, flag) ((opts)->xdl_opts & XDF_##flag)
#define DIFF_XDL_SET(opts, flag) ((opts)->xdl_opts |= XDF_##flag)
#define DIFF_XDL_CLR(opts, flag) ((opts)->xdl_opts &= ~XDF_##flag)
const char *stat_sep;
long xdl_opts;
+ /* see Documentation/diff-options.txt */
+ char **anchors;
+ size_t anchors_nr, anchors_alloc;
+
int stat_width;
int stat_name_width;
int stat_graph_width;
pathchange_fn_t pathchange;
change_fn_t change;
add_remove_fn_t add_remove;
+ void *change_fn_data;
diff_format_fn_t format_callback;
void *format_callback_data;
diff_prefix_fn_t output_prefix;