#include "tree-walk.h"
#include "pathspec.h"
#include "object.h"
+#include "oidset.h"
struct rev_info;
struct diff_options;
#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 default_follow_renames:1;
};
static inline void diff_flags_or(struct diff_flags *a,
tmp_a[i] |= tmp_b[i];
}
-#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)
int skip_stat_unmatch;
int line_termination;
int output_format;
- int pickaxe_opts;
+ unsigned pickaxe_opts;
int rename_score;
int rename_limit;
int needed_rename_limit;
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;
enum diff_words_type word_diff;
enum diff_submodule_format submodule_format;
+ struct oidset *objfind;
+
/* this is set by diffcore for DIFF_FORMAT_PATCH */
int found_changes;
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;
#define DIFF_PICKAXE_KIND_S 4 /* traditional plumbing counter */
#define DIFF_PICKAXE_KIND_G 8 /* grep in the patch */
+#define DIFF_PICKAXE_KIND_OBJFIND 16 /* specific object IDs */
+
+#define DIFF_PICKAXE_KINDS_MASK (DIFF_PICKAXE_KIND_S | \
+ DIFF_PICKAXE_KIND_G | \
+ DIFF_PICKAXE_KIND_OBJFIND)
+
+#define DIFF_PICKAXE_IGNORE_CASE 32
extern void diffcore_std(struct diff_options *);
extern void diffcore_fix_diff_index(struct diff_options *);