Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-01-24 00:16:37 +0300
committerJunio C Hamano <gitster@pobox.com>2018-01-24 00:16:37 +0300
commitc0d75f0e2e2cbf432358bfd00be593fd28e257a3 (patch)
treeddf40ec50af3fb5dae3793950ec366fd3a03e2b5 /diff.h
parentaddd37cd64e109eb0224e522869962519224cc78 (diff)
parent4d8c51aa19be94bddb7cac6b11bccb4d23dfd4f8 (diff)
Merge branch 'sb/diff-blobfind-pickaxe'
"diff" family of commands learned "--find-object=<object-id>" option to limit the findings to changes that involve the named object. * sb/diff-blobfind-pickaxe: diff: use HAS_MULTI_BITS instead of counting bits manually diff: properly error out when combining multiple pickaxe options diffcore: add a pickaxe option to find a specific blob diff: introduce DIFF_PICKAXE_KINDS_MASK diff: migrate diff_flags.pickaxe_ignore_case to a pickaxe_opts bit diff.h: make pickaxe_opts an unsigned bit field
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/diff.h b/diff.h
index 7cf276f077..6bd278aac1 100644
--- a/diff.h
+++ b/diff.h
@@ -7,6 +7,7 @@
#include "tree-walk.h"
#include "pathspec.h"
#include "object.h"
+#include "oidset.h"
struct rev_info;
struct diff_options;
@@ -91,7 +92,6 @@ struct diff_flags {
unsigned override_submodule_config:1;
unsigned dirstat_by_line:1;
unsigned funccontext:1;
- unsigned pickaxe_ignore_case:1;
unsigned default_follow_renames:1;
};
@@ -146,7 +146,7 @@ struct diff_options {
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;
@@ -178,6 +178,8 @@ struct diff_options {
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;
@@ -330,6 +332,13 @@ extern void diff_setup_done(struct diff_options *);
#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 *);