summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-09 05:31:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-09 05:31:27 (GMT)
commit8cc633286a4803025d84b77c808a2c7ad8616f2f (patch)
tree624047e4917cd5113dad8f487dd8dec21985c775 /combine-diff.c
parentbde13700105a1c945819578ce8d5c0627d52c741 (diff)
parent0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b (diff)
downloadgit-8cc633286a4803025d84b77c808a2c7ad8616f2f.zip
git-8cc633286a4803025d84b77c808a2c7ad8616f2f.tar.gz
git-8cc633286a4803025d84b77c808a2c7ad8616f2f.tar.bz2
Merge branch 'bw/diff-opt-impl-to-bitfields'
A single-word "unsigned flags" in the diff options is being split into a structure with many bitfields. * bw/diff-opt-impl-to-bitfields: diff: make struct diff_flags members lowercase diff: remove DIFF_OPT_CLR macro diff: remove DIFF_OPT_SET macro diff: remove DIFF_OPT_TST macro diff: remove touched flags diff: add flag to indicate textconv was set via cmdline diff: convert flags to be stored in bitfields add, reset: use DIFF_OPT_SET macro to set a diff flag
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 82f6070..2505de1 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -898,7 +898,7 @@ static void show_combined_header(struct combine_diff_path *elem,
int show_file_header)
{
struct diff_options *opt = &rev->diffopt;
- int abbrev = DIFF_OPT_TST(opt, FULL_INDEX) ? GIT_SHA1_HEXSZ : DEFAULT_ABBREV;
+ int abbrev = opt->flags.full_index ? GIT_SHA1_HEXSZ : DEFAULT_ABBREV;
const char *a_prefix = opt->a_prefix ? opt->a_prefix : "a/";
const char *b_prefix = opt->b_prefix ? opt->b_prefix : "b/";
const char *c_meta = diff_get_color_opt(opt, DIFF_METAINFO);
@@ -987,7 +987,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
userdiff = userdiff_find_by_path(elem->path);
if (!userdiff)
userdiff = userdiff_find_by_name("default");
- if (DIFF_OPT_TST(opt, ALLOW_TEXTCONV))
+ if (opt->flags.allow_textconv)
textconv = userdiff_get_textconv(userdiff);
/* Read the result of merge first */
@@ -1413,8 +1413,8 @@ void diff_tree_combined(const struct object_id *oid,
diffopts = *opt;
copy_pathspec(&diffopts.pathspec, &opt->pathspec);
- DIFF_OPT_SET(&diffopts, RECURSIVE);
- DIFF_OPT_CLR(&diffopts, ALLOW_EXTERNAL);
+ diffopts.flags.recursive = 1;
+ diffopts.flags.allow_external = 0;
/* find set of paths that everybody touches
*
@@ -1435,7 +1435,7 @@ void diff_tree_combined(const struct object_id *oid,
* NOTE please keep this semantically in sync with diffcore_std()
*/
need_generic_pathscan = opt->skip_stat_unmatch ||
- DIFF_OPT_TST(opt, FOLLOW_RENAMES) ||
+ opt->flags.follow_renames ||
opt->break_opt != -1 ||
opt->detect_rename ||
opt->pickaxe ||