#include "tree-walk.h"
#include "pathspec.h"
#include "object.h"
+#include "oidset.h"
struct rev_info;
struct diff_options;
unsigned override_submodule_config:1;
unsigned dirstat_by_line:1;
unsigned funccontext:1;
- unsigned pickaxe_ignore_case:1;
unsigned default_follow_renames:1;
+ unsigned stat_with_summary:1;
};
static inline void diff_flags_or(struct diff_flags *a,
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;
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;
enum {
COLOR_MOVED_NO = 0,
COLOR_MOVED_PLAIN = 1,
- COLOR_MOVED_ZEBRA = 2,
- COLOR_MOVED_ZEBRA_DIM = 3,
+ COLOR_MOVED_BLOCKS = 2,
+ COLOR_MOVED_ZEBRA = 3,
+ COLOR_MOVED_ZEBRA_DIM = 4,
} color_moved;
#define COLOR_MOVED_DEFAULT COLOR_MOVED_ZEBRA
#define COLOR_MOVED_MIN_ALNUM_COUNT 20
+
+ /* XDF_WHITESPACE_FLAGS regarding block detection are set at 2, 3, 4 */
+ #define COLOR_MOVED_WS_ALLOW_INDENTATION_CHANGE (1<<5)
+ int color_moved_ws_handling;
};
void diff_emit_submodule_del(struct diff_options *o, const char *line);
extern void diff_setup(struct diff_options *);
extern int diff_opt_parse(struct diff_options *, const char **, int, const char *);
extern void diff_setup_done(struct diff_options *);
+extern int git_config_rename(const char *var, const char *value);
#define DIFF_DETECT_RENAME 1
#define DIFF_DETECT_COPY 2
#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 *);