diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-01-23 13:16:37 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-23 13:16:37 -0800 |
commit | c0d75f0e2e2cbf432358bfd00be593fd28e257a3 (patch) | |
tree | ddf40ec50af3fb5dae3793950ec366fd3a03e2b5 /diff.h | |
parent | addd37cd64e109eb0224e522869962519224cc78 (diff) | |
parent | 4d8c51aa19be94bddb7cac6b11bccb4d23dfd4f8 (diff) | |
download | git-c0d75f0e2e2cbf432358bfd00be593fd28e257a3.tar.gz |
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.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 *); |