switch (st.st_mode & S_IFMT) {
case S_IFREG:
- if (opt->flags.ALLOW_TEXTCONV &&
+ if (opt->flags.allow_textconv &&
textconv_object(read_from, mode, &null_oid, 0, &buf_ptr, &buf_len))
strbuf_attach(&buf, buf_ptr, buf_len, buf_len + 1);
else if (strbuf_read_file(&buf, read_from, st.st_size) != st.st_size)
unsigned long file_size;
(*num_read_blob)++;
- if (opt->flags.ALLOW_TEXTCONV &&
+ if (opt->flags.allow_textconv &&
textconv_object(o->path, o->mode, &o->blob_oid, 1, &file->ptr, &file_size))
;
else
* same and diff-tree is fairly efficient about this.
*/
diff_setup(&diff_opts);
- diff_opts.flags.RECURSIVE = 1;
+ diff_opts.flags.recursive = 1;
diff_opts.detect_rename = 0;
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
paths[0] = origin->path;
int i;
diff_setup(&diff_opts);
- diff_opts.flags.RECURSIVE = 1;
+ diff_opts.flags.recursive = 1;
diff_opts.detect_rename = DIFF_DETECT_RENAME;
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_opts.single_follow = origin->path;
return; /* nothing remains for this target */
diff_setup(&diff_opts);
- diff_opts.flags.RECURSIVE = 1;
+ diff_opts.flags.recursive = 1;
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_setup_done(&diff_opts);
if ((opt & PICKAXE_BLAME_COPY_HARDEST)
|| ((opt & PICKAXE_BLAME_COPY_HARDER)
&& (!porigin || strcmp(target->path, porigin->path))))
- diff_opts.flags.FIND_COPIES_HARDER = 1;
+ diff_opts.flags.find_copies_harder = 1;
if (is_null_oid(&target->commit->object.oid))
do_diff_cache(&parent->tree->object.oid, &diff_opts);
&target->commit->tree->object.oid,
"", &diff_opts);
- if (!diff_opts.flags.FIND_COPIES_HARDER)
+ if (!diff_opts.flags.find_copies_harder)
diffcore_std(&diff_opts);
do {
if (fill_blob_sha1_and_mode(o))
die(_("no such path %s in %s"), path, final_commit_name);
- if (sb->revs->diffopt.flags.ALLOW_TEXTCONV &&
+ if (sb->revs->diffopt.flags.allow_textconv &&
textconv_object(path, o->mode, &o->blob_oid, 1, (char **) &sb->final_buf,
&sb->final_buf_size))
;
rev.diffopt.output_format = DIFF_FORMAT_CALLBACK;
rev.diffopt.format_callback = update_callback;
rev.diffopt.format_callback_data = &data;
- rev.diffopt.flags.OVERRIDE_SUBMODULE_CONFIG = 1;
+ rev.diffopt.flags.override_submodule_config = 1;
rev.max_count = 0; /* do not compare unmerged paths with stage #2 */
run_diff_files(&rev, DIFF_RACY_IS_MODIFIED);
clear_pathspec(&rev.prune_data);
argc = setup_revisions(argc, argv, &rev, NULL);
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
rev.diffopt.use_color = 0;
- rev.diffopt.flags.IGNORE_DIRTY_SUBMODULES = 1;
+ rev.diffopt.flags.ignore_dirty_submodules = 1;
out = open(file, O_CREAT | O_WRONLY, 0666);
if (out < 0)
die(_("Could not open '%s' for writing."), file);
struct diff_options opt;
diff_setup(&opt);
- opt.flags.EXIT_WITH_STATUS = 1;
+ opt.flags.exit_with_status = 1;
if (!sb)
- opt.flags.QUICK = 1;
+ opt.flags.quick = 1;
do_diff_cache(&head, &opt);
diffcore_std(&opt);
for (i = 0; sb && i < diff_queued_diff.nr; i++) {
strbuf_addstr(sb, diff_queued_diff.queue[i]->two->path);
}
diff_flush(&opt);
- return opt.flags.HAS_CHANGES != 0;
+ return opt.flags.has_changes != 0;
} else {
for (i = 0; sb && i < active_nr; i++) {
if (i)
rev_info.show_root_diff = 1;
rev_info.diffopt.output_format = DIFF_FORMAT_PATCH;
rev_info.no_commit_id = 1;
- rev_info.diffopt.flags.BINARY = 1;
- rev_info.diffopt.flags.FULL_INDEX = 1;
+ rev_info.diffopt.flags.binary = 1;
+ rev_info.diffopt.flags.full_index = 1;
rev_info.diffopt.use_color = 0;
rev_info.diffopt.file = fp;
rev_info.diffopt.close_file = 1;
git_config(git_blame_config, &output_option);
init_revisions(&revs, NULL);
revs.date_mode = blame_date_mode;
- revs.diffopt.flags.ALLOW_TEXTCONV = 1;
- revs.diffopt.flags.FOLLOW_RENAMES = 1;
+ revs.diffopt.flags.allow_textconv = 1;
+ revs.diffopt.flags.follow_renames = 1;
save_commit_buffer = 0;
dashdash_pos = 0;
parse_revision_opt(&revs, &ctx, options, blame_opt_usage);
}
parse_done:
- no_whole_file_rename = !revs.diffopt.flags.FOLLOW_RENAMES;
+ no_whole_file_rename = !revs.diffopt.flags.follow_renames;
xdl_opts |= revs.diffopt.xdl_opts & XDF_INDENT_HEURISTIC;
- revs.diffopt.flags.FOLLOW_RENAMES = 0;
+ revs.diffopt.flags.follow_renames = 0;
argc = parse_options_end(&ctx);
if (incremental || (output_option & OUTPUT_PORCELAIN)) {
}
blame_date_width -= 1; /* strip the null */
- if (revs.diffopt.flags.FIND_COPIES_HARDER)
+ if (revs.diffopt.flags.find_copies_harder)
opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE |
PICKAXE_BLAME_COPY_HARDER);
* be really confusing.
*/
struct diff_flags flags = DIFF_FLAGS_INIT;
- flags.OVERRIDE_SUBMODULE_CONFIG = 1;
+ flags.override_submodule_config = 1;
if (ignore_submodule_arg &&
!strcmp(ignore_submodule_arg, "all"))
- flags.IGNORE_SUBMODULES = 1;
+ flags.ignore_submodules = 1;
commitable = index_differs_from(parent, &flags, 1);
}
}
!oidcmp(old_oid, new_oid) && (old_mode == new_mode))
return;
- if (opt->flags.REVERSE_DIFF) {
+ if (opt->flags.reverse_diff) {
SWAP(old_mode, new_mode);
SWAP(old_oid, new_oid);
SWAP(old_path, new_path);
rev.diffopt.stat_graph_width = -1;
/* Default to let external and textconv be used */
- rev.diffopt.flags.ALLOW_EXTERNAL = 1;
- rev.diffopt.flags.ALLOW_TEXTCONV = 1;
+ rev.diffopt.flags.allow_external = 1;
+ rev.diffopt.flags.allow_textconv = 1;
if (nongit)
die(_("Not a git repository"));
diff_setup_done(&rev.diffopt);
}
- rev.diffopt.flags.RECURSIVE = 1;
+ rev.diffopt.flags.recursive = 1;
setup_diff_pager(&rev.diffopt);
die("revision walk setup failed");
revs.diffopt.format_callback = show_filemodify;
revs.diffopt.format_callback_data = &paths_of_changed_objects;
- revs.diffopt.flags.RECURSIVE = 1;
+ revs.diffopt.flags.recursive = 1;
while ((commit = get_revision(&revs))) {
if (has_unshown_parent(commit)) {
add_object_array(&commit->object, NULL, &commits);
if (fmt_pretty)
get_commit_format(fmt_pretty, rev);
if (default_follow)
- rev->diffopt.flags.DEFAULT_FOLLOW_RENAMES = 1;
+ rev->diffopt.flags.default_follow_renames = 1;
rev->verbose_header = 1;
- rev->diffopt.flags.RECURSIVE = 1;
+ rev->diffopt.flags.recursive = 1;
rev->diffopt.stat_width = -1; /* use full terminal width */
rev->diffopt.stat_graph_width = -1; /* respect statGraphWidth config */
rev->abbrev_commit = default_abbrev_commit;
rev->show_root_diff = default_show_root;
rev->subject_prefix = fmt_patch_subject_prefix;
rev->show_signature = default_show_signature;
- rev->diffopt.flags.ALLOW_TEXTCONV = 1;
+ rev->diffopt.flags.allow_textconv = 1;
if (default_date_mode)
parse_date_format(default_date_mode, &rev->date_mode);
init_display_notes(&rev->notes_opt);
if (rev->diffopt.pickaxe || rev->diffopt.filter ||
- rev->diffopt.flags.FOLLOW_RENAMES)
+ rev->diffopt.flags.follow_renames)
rev->always_show_header = 0;
if (source)
fclose(rev->diffopt.file);
if (rev->diffopt.output_format & DIFF_FORMAT_CHECKDIFF &&
- rev->diffopt.flags.CHECK_FAILED) {
+ rev->diffopt.flags.check_failed) {
return 02;
}
return diff_result_code(&rev->diffopt, 0);
unsigned long size;
fflush(rev->diffopt.file);
- if (!rev->diffopt.flags.TEXTCONV_SET_VIA_CMDLINE ||
- !rev->diffopt.flags.ALLOW_TEXTCONV)
+ if (!rev->diffopt.flags.textconv_set_via_cmdline ||
+ !rev->diffopt.flags.allow_textconv)
return stream_blob_to_fd(1, oid, NULL, 0);
if (get_oid_with_context(obj_name, GET_OID_RECORD_PATH,
static void log_setup_revisions_tweak(struct rev_info *rev,
struct setup_revision_opt *opt)
{
- if (rev->diffopt.flags.DEFAULT_FOLLOW_RENAMES &&
+ if (rev->diffopt.flags.default_follow_renames &&
rev->prune_data.nr == 1)
- rev->diffopt.flags.FOLLOW_RENAMES = 1;
+ rev->diffopt.flags.follow_renames = 1;
/* Turn --cc/-c into -p --cc/-c when -p was not given */
if (!rev->diffopt.output_format && rev->combine_merges)
return;
diff_setup(&diffopt);
- diffopt.flags.RECURSIVE = 1;
+ diffopt.flags.recursive = 1;
diff_setup_done(&diffopt);
oidcpy(&bases->base_commit, &base->object.oid);
rev.verbose_header = 1;
rev.diff = 1;
rev.max_parents = 1;
- rev.diffopt.flags.RECURSIVE = 1;
+ rev.diffopt.flags.recursive = 1;
rev.subject_prefix = fmt_patch_subject_prefix;
memset(&s_r_opt, 0, sizeof(s_r_opt));
s_r_opt.def = "HEAD";
rev.zero_commit = zero_commit;
- if (!rev.diffopt.flags.TEXT && !no_binary_diff)
- rev.diffopt.flags.BINARY = 1;
+ if (!rev.diffopt.flags.text && !no_binary_diff)
+ rev.diffopt.flags.binary = 1;
if (rev.show_notes)
init_display_notes(&rev.notes_opt);
opt.output_format = DIFF_FORMAT_CALLBACK;
opt.format_callback = update_index_from_diff;
opt.format_callback_data = &intent_to_add;
- opt.flags.OVERRIDE_SUBMODULE_CONFIG = 1;
+ opt.flags.override_submodule_config = 1;
if (do_diff_cache(tree_oid, &opt))
return 1;
if (revs.bisect)
bisect_list = 1;
- if (revs.diffopt.flags.QUICK)
+ if (revs.diffopt.flags.quick)
info.flags |= REV_LIST_QUIET;
for (i = 1 ; i < argc; i++) {
const char *arg = argv[i];
int show_file_header)
{
struct diff_options *opt = &rev->diffopt;
- int abbrev = opt->flags.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);
userdiff = userdiff_find_by_path(elem->path);
if (!userdiff)
userdiff = userdiff_find_by_name("default");
- if (opt->flags.ALLOW_TEXTCONV)
+ if (opt->flags.allow_textconv)
textconv = userdiff_get_textconv(userdiff);
/* Read the result of merge first */
diffopts = *opt;
copy_pathspec(&diffopts.pathspec, &opt->pathspec);
- diffopts.flags.RECURSIVE = 1;
- diffopts.flags.ALLOW_EXTERNAL = 0;
+ diffopts.flags.recursive = 1;
+ diffopts.flags.allow_external = 0;
/* find set of paths that everybody touches
*
* NOTE please keep this semantically in sync with diffcore_std()
*/
need_generic_pathscan = opt->skip_stat_unmatch ||
- opt->flags.FOLLOW_RENAMES ||
+ opt->flags.follow_renames ||
opt->break_opt != -1 ||
opt->detect_rename ||
opt->pickaxe ||
int changed = ce_match_stat(ce, st, ce_option);
if (S_ISGITLINK(ce->ce_mode)) {
struct diff_flags orig_flags = diffopt->flags;
- if (!diffopt->flags.OVERRIDE_SUBMODULE_CONFIG)
+ if (!diffopt->flags.override_submodule_config)
set_diffopt_flags_from_submodule_config(diffopt, ce->name);
- if (diffopt->flags.IGNORE_SUBMODULES)
+ if (diffopt->flags.ignore_submodules)
changed = 0;
- else if (!diffopt->flags.IGNORE_DIRTY_SUBMODULES &&
- (!changed || diffopt->flags.DIRTY_SUBMODULES))
+ else if (!diffopt->flags.ignore_dirty_submodules &&
+ (!changed || diffopt->flags.dirty_submodules))
*dirty_submodule = is_submodule_modified(ce->name,
- diffopt->flags.IGNORE_UNTRACKED_IN_SUBMODULES);
+ diffopt->flags.ignore_untracked_in_submodules);
diffopt->flags = orig_flags;
}
return changed;
if (!changed && !dirty_submodule) {
ce_mark_uptodate(ce);
- if (!revs->diffopt.flags.FIND_COPIES_HARDER)
+ if (!revs->diffopt.flags.find_copies_harder)
continue;
}
oldmode = ce->ce_mode;
oldmode = old->ce_mode;
if (mode == oldmode && !oidcmp(oid, &old->oid) && !dirty_submodule &&
- !revs->diffopt.flags.FIND_COPIES_HARDER)
+ !revs->diffopt.flags.find_copies_harder)
return 0;
diff_change(&revs->diffopt, oldmode, mode,
opts.head_idx = 1;
opts.index_only = cached;
opts.diff_index_cached = (cached &&
- !revs->diffopt.flags.FIND_COPIES_HARDER);
+ !revs->diffopt.flags.find_copies_harder);
opts.merge = 1;
opts.fn = oneway_diff;
opts.unpack_data = revs;
memset(&opt, 0, sizeof(opt));
opt.def = def;
setup_revisions(0, NULL, &rev, &opt);
- rev.diffopt.flags.QUICK = 1;
- rev.diffopt.flags.EXIT_WITH_STATUS = 1;
+ rev.diffopt.flags.quick = 1;
+ rev.diffopt.flags.exit_with_status = 1;
if (flags)
diff_flags_or(&rev.diffopt.flags, flags);
rev.diffopt.ita_invisible_in_index = ita_invisible_in_index;
run_diff_index(&rev, 1);
object_array_clear(&rev.pending);
- return (rev.diffopt.flags.HAS_CHANGES != 0);
+ return (rev.diffopt.flags.has_changes != 0);
}
} else {
struct diff_filespec *d1, *d2;
- if (o->flags.REVERSE_DIFF) {
+ if (o->flags.reverse_diff) {
SWAP(mode1, mode2);
SWAP(name1, name2);
}
if (!revs->diffopt.output_format)
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
- revs->diffopt.flags.NO_INDEX = 1;
+ revs->diffopt.flags.no_index = 1;
- revs->diffopt.flags.RELATIVE_NAME = 1;
+ revs->diffopt.flags.relative_name = 1;
revs->diffopt.prefix = prefix;
revs->max_count = -2;
diff_setup_done(&revs->diffopt);
setup_diff_pager(&revs->diffopt);
- revs->diffopt.flags.EXIT_WITH_STATUS = 1;
+ revs->diffopt.flags.exit_with_status = 1;
if (queue_diff(&revs->diffopt, paths[0], paths[1]))
exit(1);
for (i = 0; i < params.nr; i++) {
const char *p = params.items[i].string;
if (!strcmp(p, "changes")) {
- options->flags.DIRSTAT_BY_LINE = 0;
- options->flags.DIRSTAT_BY_FILE = 0;
+ options->flags.dirstat_by_line = 0;
+ options->flags.dirstat_by_file = 0;
} else if (!strcmp(p, "lines")) {
- options->flags.DIRSTAT_BY_LINE = 1;
- options->flags.DIRSTAT_BY_FILE = 0;
+ options->flags.dirstat_by_line = 1;
+ options->flags.dirstat_by_file = 0;
} else if (!strcmp(p, "files")) {
- options->flags.DIRSTAT_BY_LINE = 0;
- options->flags.DIRSTAT_BY_FILE = 1;
+ options->flags.dirstat_by_line = 0;
+ options->flags.dirstat_by_file = 1;
} else if (!strcmp(p, "noncumulative")) {
- options->flags.DIRSTAT_CUMULATIVE = 0;
+ options->flags.dirstat_cumulative = 0;
} else if (!strcmp(p, "cumulative")) {
- options->flags.DIRSTAT_CUMULATIVE = 1;
+ options->flags.dirstat_cumulative = 1;
} else if (isdigit(*p)) {
char *end;
int permille = strtoul(p, &end, 10) * 10;
struct emit_callback ecbdata;
struct strbuf out = STRBUF_INIT;
- if (diff_mnemonic_prefix && o->flags.REVERSE_DIFF) {
+ if (diff_mnemonic_prefix && o->flags.reverse_diff) {
a_prefix = o->b_prefix;
b_prefix = o->a_prefix;
} else {
dir.alloc = 0;
dir.nr = 0;
dir.permille = options->dirstat_permille;
- dir.cumulative = options->flags.DIRSTAT_CUMULATIVE;
+ dir.cumulative = options->flags.dirstat_cumulative;
changed = 0;
for (i = 0; i < q->nr; i++) {
goto found_damage;
}
- if (options->flags.DIRSTAT_BY_FILE) {
+ if (options->flags.dirstat_by_file) {
/*
* In --dirstat-by-file mode, we don't really need to
* look at the actual file contents at all.
dir.alloc = 0;
dir.nr = 0;
dir.permille = options->dirstat_permille;
- dir.cumulative = options->flags.DIRSTAT_CUMULATIVE;
+ dir.cumulative = options->flags.dirstat_cumulative;
changed = 0;
for (i = 0; i < data->nr; i++) {
const char *line_prefix = diff_line_prefix(o);
diff_set_mnemonic_prefix(o, "a/", "b/");
- if (o->flags.REVERSE_DIFF) {
+ if (o->flags.reverse_diff) {
a_prefix = o->b_prefix;
b_prefix = o->a_prefix;
} else {
return;
}
- if (o->flags.ALLOW_TEXTCONV) {
+ if (o->flags.allow_textconv) {
textconv_one = get_textconv(one);
textconv_two = get_textconv(two);
}
header.len, 0);
strbuf_reset(&header);
goto free_ab_and_return;
- } else if (!o->flags.TEXT &&
+ } else if (!o->flags.text &&
( (!textconv_one && diff_filespec_is_binary(one)) ||
(!textconv_two && diff_filespec_is_binary(two)) )) {
struct strbuf sb = STRBUF_INIT;
if (!one->data && !two->data &&
S_ISREG(one->mode) && S_ISREG(two->mode) &&
- !o->flags.BINARY) {
+ !o->flags.binary) {
if (!oidcmp(&one->oid, &two->oid)) {
if (must_show_header)
emit_diff_symbol(o, DIFF_SYMBOL_HEADER,
}
emit_diff_symbol(o, DIFF_SYMBOL_HEADER, header.buf, header.len, 0);
strbuf_reset(&header);
- if (o->flags.BINARY)
+ if (o->flags.binary)
emit_binary_diff(o, &mf1, &mf2);
else {
strbuf_addf(&sb, "%sBinary files %s and %s differ\n",
xecfg.ctxlen = o->context;
xecfg.interhunkctxlen = o->interhunkcontext;
xecfg.flags = XDL_EMIT_FUNCNAMES;
- if (o->flags.FUNCCONTEXT)
+ if (o->flags.funccontext)
xecfg.flags |= XDL_EMIT_FUNCCONTEXT;
if (pe)
xdiff_set_find_func(&xecfg, pe->pattern, pe->cflags);
diff_free_filespec_data(one);
diff_free_filespec_data(two);
if (data.status)
- o->flags.CHECK_FAILED = 1;
+ o->flags.check_failed = 1;
}
struct diff_filespec *alloc_filespec(const char *path)
*must_show_header = 0;
}
if (one && two && oidcmp(&one->oid, &two->oid)) {
- int abbrev = o->flags.FULL_INDEX ? 40 : DEFAULT_ABBREV;
+ int abbrev = o->flags.full_index ? 40 : DEFAULT_ABBREV;
- if (o->flags.BINARY) {
+ if (o->flags.binary) {
mmfile_t mf;
if ((!fill_mmfile(&mf, one) && diff_filespec_is_binary(one)) ||
(!fill_mmfile(&mf, two) && diff_filespec_is_binary(two)))
int must_show_header = 0;
- if (o->flags.ALLOW_EXTERNAL) {
+ if (o->flags.allow_external) {
struct userdiff_driver *drv = userdiff_find_by_path(attr_path);
if (drv && drv->external)
pgm = drv->external;
if (o->prefix_length)
strip_prefix(o->prefix_length, &name, &other);
- if (!o->flags.ALLOW_EXTERNAL)
+ if (!o->flags.allow_external)
pgm = NULL;
if (DIFF_PAIR_UNMERGED(p)) {
options->context = diff_context_default;
options->interhunkcontext = diff_interhunk_context_default;
options->ws_error_highlight = ws_error_highlight_default;
- options->flags.RENAME_EMPTY = 1;
+ options->flags.rename_empty = 1;
/* pathchange left =NULL by default */
options->change = diff_change;
if (DIFF_XDL_TST(options, IGNORE_WHITESPACE) ||
DIFF_XDL_TST(options, IGNORE_WHITESPACE_CHANGE) ||
DIFF_XDL_TST(options, IGNORE_WHITESPACE_AT_EOL))
- options->flags.DIFF_FROM_CONTENTS = 1;
+ options->flags.diff_from_contents = 1;
else
- options->flags.DIFF_FROM_CONTENTS = 0;
+ options->flags.diff_from_contents = 0;
- if (options->flags.FIND_COPIES_HARDER)
+ if (options->flags.find_copies_harder)
options->detect_rename = DIFF_DETECT_COPY;
- if (!options->flags.RELATIVE_NAME)
+ if (!options->flags.relative_name)
options->prefix = NULL;
if (options->prefix)
options->prefix_length = strlen(options->prefix);
DIFF_FORMAT_DIRSTAT |
DIFF_FORMAT_SUMMARY |
DIFF_FORMAT_CHECKDIFF))
- options->flags.RECURSIVE = 1;
+ options->flags.recursive = 1;
/*
* Also pickaxe would not work very well if you do not say recursive
*/
if (options->pickaxe)
- options->flags.RECURSIVE = 1;
+ options->flags.recursive = 1;
/*
* When patches are generated, submodules diffed against the work tree
* must be checked for dirtiness too so it can be shown in the output
*/
if (options->output_format & DIFF_FORMAT_PATCH)
- options->flags.DIRTY_SUBMODULES = 1;
+ options->flags.dirty_submodules = 1;
if (options->detect_rename && options->rename_limit < 0)
options->rename_limit = diff_rename_limit_default;
* to have found. It does not make sense not to return with
* exit code in such a case either.
*/
- if (options->flags.QUICK) {
+ if (options->flags.quick) {
options->output_format = DIFF_FORMAT_NO_OUTPUT;
- options->flags.EXIT_WITH_STATUS = 1;
+ options->flags.exit_with_status = 1;
}
options->diff_path_counter = 0;
- if (options->flags.FOLLOW_RENAMES && options->pathspec.nr != 1)
+ if (options->flags.follow_renames && options->pathspec.nr != 1)
die(_("--follow requires exactly one pathspec"));
if (!options->use_color || external_diff())
else if (starts_with(arg, "-C") || starts_with(arg, "--find-copies=") ||
!strcmp(arg, "--find-copies")) {
if (options->detect_rename == DIFF_DETECT_COPY)
- options->flags.FIND_COPIES_HARDER = 1;
+ options->flags.find_copies_harder = 1;
if ((options->rename_score = diff_scoreopt_parse(arg)) == -1)
return error("invalid argument to -C: %s", arg+2);
options->detect_rename = DIFF_DETECT_COPY;
else if (!strcmp(arg, "--no-renames"))
options->detect_rename = 0;
else if (!strcmp(arg, "--rename-empty"))
- options->flags.RENAME_EMPTY = 1;
+ options->flags.rename_empty = 1;
else if (!strcmp(arg, "--no-rename-empty"))
- options->flags.RENAME_EMPTY = 0;
+ options->flags.rename_empty = 0;
else if (!strcmp(arg, "--relative"))
- options->flags.RELATIVE_NAME = 1;
+ options->flags.relative_name = 1;
else if (skip_prefix(arg, "--relative=", &arg)) {
- options->flags.RELATIVE_NAME = 1;
+ options->flags.relative_name = 1;
options->prefix = arg;
}
/* flags options */
else if (!strcmp(arg, "--binary")) {
enable_patch_output(&options->output_format);
- options->flags.BINARY = 1;
+ options->flags.binary = 1;
}
else if (!strcmp(arg, "--full-index"))
- options->flags.FULL_INDEX = 1;
+ options->flags.full_index = 1;
else if (!strcmp(arg, "-a") || !strcmp(arg, "--text"))
- options->flags.TEXT = 1;
+ options->flags.text = 1;
else if (!strcmp(arg, "-R"))
- options->flags.REVERSE_DIFF = 1;
+ options->flags.reverse_diff = 1;
else if (!strcmp(arg, "--find-copies-harder"))
- options->flags.FIND_COPIES_HARDER = 1;
+ options->flags.find_copies_harder = 1;
else if (!strcmp(arg, "--follow"))
- options->flags.FOLLOW_RENAMES = 1;
+ options->flags.follow_renames = 1;
else if (!strcmp(arg, "--no-follow")) {
- options->flags.FOLLOW_RENAMES = 0;
- options->flags.DEFAULT_FOLLOW_RENAMES = 0;
+ options->flags.follow_renames = 0;
+ options->flags.default_follow_renames = 0;
} else if (!strcmp(arg, "--color"))
options->use_color = 1;
else if (skip_prefix(arg, "--color=", &arg)) {
return argcount;
}
else if (!strcmp(arg, "--exit-code"))
- options->flags.EXIT_WITH_STATUS = 1;
+ options->flags.exit_with_status = 1;
else if (!strcmp(arg, "--quiet"))
- options->flags.QUICK = 1;
+ options->flags.quick = 1;
else if (!strcmp(arg, "--ext-diff"))
- options->flags.ALLOW_EXTERNAL = 1;
+ options->flags.allow_external = 1;
else if (!strcmp(arg, "--no-ext-diff"))
- options->flags.ALLOW_EXTERNAL = 0;
+ options->flags.allow_external = 0;
else if (!strcmp(arg, "--textconv")) {
- options->flags.ALLOW_TEXTCONV = 1;
- options->flags.TEXTCONV_SET_VIA_CMDLINE = 1;
+ options->flags.allow_textconv = 1;
+ options->flags.textconv_set_via_cmdline = 1;
} else if (!strcmp(arg, "--no-textconv"))
- options->flags.ALLOW_TEXTCONV = 0;
+ options->flags.allow_textconv = 0;
else if (!strcmp(arg, "--ignore-submodules")) {
- options->flags.OVERRIDE_SUBMODULE_CONFIG = 1;
+ options->flags.override_submodule_config = 1;
handle_ignore_submodules_arg(options, "all");
} else if (skip_prefix(arg, "--ignore-submodules=", &arg)) {
- options->flags.OVERRIDE_SUBMODULE_CONFIG = 1;
+ options->flags.override_submodule_config = 1;
handle_ignore_submodules_arg(options, arg);
} else if (!strcmp(arg, "--submodule"))
options->submodule_format = DIFF_SUBMODULE_LOG;
&options->interhunkcontext))
;
else if (!strcmp(arg, "-W"))
- options->flags.FUNCCONTEXT = 1;
+ options->flags.funccontext = 1;
else if (!strcmp(arg, "--function-context"))
- options->flags.FUNCCONTEXT = 1;
+ options->flags.funccontext = 1;
else if (!strcmp(arg, "--no-function-context"))
- options->flags.FUNCCONTEXT = 0;
+ options->flags.funccontext = 0;
else if ((argcount = parse_long_opt("output", av, &optarg))) {
char *path = prefix_filename(prefix, optarg);
options->file = xfopen(path, "w");
separator++;
}
- if (output_format & DIFF_FORMAT_DIRSTAT && options->flags.DIRSTAT_BY_LINE)
+ if (output_format & DIFF_FORMAT_DIRSTAT && options->flags.dirstat_by_line)
dirstat_by_line = 1;
if (output_format & (DIFF_FORMAT_DIFFSTAT|DIFF_FORMAT_SHORTSTAT|DIFF_FORMAT_NUMSTAT) ||
}
if (output_format & DIFF_FORMAT_NO_OUTPUT &&
- options->flags.EXIT_WITH_STATUS &&
- options->flags.DIFF_FROM_CONTENTS) {
+ options->flags.exit_with_status &&
+ options->flags.diff_from_contents) {
/*
* run diff_flush_patch for the exit status. setting
* options->file to /dev/null should be safe, because we
* diff_addremove/diff_change does not set the bit when
* DIFF_FROM_CONTENTS is in effect (e.g. with -w).
*/
- if (options->flags.DIFF_FROM_CONTENTS) {
+ if (options->flags.diff_from_contents) {
if (options->found_changes)
- options->flags.HAS_CHANGES = 1;
+ options->flags.has_changes = 1;
else
- options->flags.HAS_CHANGES = 0;
+ options->flags.has_changes = 0;
}
}
* to determine how many paths were dirty only
* due to stat info mismatch.
*/
- if (!diffopt->flags.NO_INDEX)
+ if (!diffopt->flags.no_index)
diffopt->skip_stat_unmatch++;
diff_free_filepair(p);
}
diff_resolve_rename_copy();
diffcore_apply_filter(options);
- if (diff_queued_diff.nr && !options->flags.DIFF_FROM_CONTENTS)
- options->flags.HAS_CHANGES = 1;
+ if (diff_queued_diff.nr && !options->flags.diff_from_contents)
+ options->flags.has_changes = 1;
else
- options->flags.HAS_CHANGES = 0;
+ options->flags.has_changes = 0;
options->found_follow = 0;
}
diff_warn_rename_limit("diff.renameLimit",
opt->needed_rename_limit,
opt->degraded_cc_to_c);
- if (!opt->flags.EXIT_WITH_STATUS &&
+ if (!opt->flags.exit_with_status &&
!(opt->output_format & DIFF_FORMAT_CHECKDIFF))
return status;
- if (opt->flags.EXIT_WITH_STATUS &&
- opt->flags.HAS_CHANGES)
+ if (opt->flags.exit_with_status &&
+ opt->flags.has_changes)
result |= 01;
if ((opt->output_format & DIFF_FORMAT_CHECKDIFF) &&
- opt->flags.CHECK_FAILED)
+ opt->flags.check_failed)
result |= 02;
return result;
}
int diff_can_quit_early(struct diff_options *opt)
{
- return (opt->flags.QUICK &&
+ return (opt->flags.quick &&
!opt->filter &&
- opt->flags.HAS_CHANGES);
+ opt->flags.has_changes);
}
/*
{
int ignored = 0;
struct diff_flags orig_flags = options->flags;
- if (!options->flags.OVERRIDE_SUBMODULE_CONFIG)
+ if (!options->flags.override_submodule_config)
set_diffopt_flags_from_submodule_config(options, path);
- if (options->flags.IGNORE_SUBMODULES)
+ if (options->flags.ignore_submodules)
ignored = 1;
options->flags = orig_flags;
return ignored;
* Before the final output happens, they are pruned after
* merged into rename/copy pairs as appropriate.
*/
- if (options->flags.REVERSE_DIFF)
+ if (options->flags.reverse_diff)
addremove = (addremove == '+' ? '-' :
addremove == '-' ? '+' : addremove);
}
diff_queue(&diff_queued_diff, one, two);
- if (!options->flags.DIFF_FROM_CONTENTS)
- options->flags.HAS_CHANGES = 1;
+ if (!options->flags.diff_from_contents)
+ options->flags.has_changes = 1;
}
void diff_change(struct diff_options *options,
is_submodule_ignored(concatpath, options))
return;
- if (options->flags.REVERSE_DIFF) {
+ if (options->flags.reverse_diff) {
SWAP(old_mode, new_mode);
SWAP(old_oid, new_oid);
SWAP(old_oid_valid, new_oid_valid);
two->dirty_submodule = new_dirty_submodule;
p = diff_queue(&diff_queued_diff, one, two);
- if (options->flags.DIFF_FROM_CONTENTS)
+ if (options->flags.diff_from_contents)
return;
- if (options->flags.QUICK && options->skip_stat_unmatch &&
+ if (options->flags.quick && options->skip_stat_unmatch &&
!diff_filespec_check_stat_unmatch(p))
return;
- options->flags.HAS_CHANGES = 1;
+ options->flags.has_changes = 1;
}
struct diff_filepair *diff_unmerge(struct diff_options *options, const char *path)
* and because it is easy to find people oneline advising "git diff
* --exit-code" in hooks and other scripts, we do not do so.
*/
- if (!opt->flags.EXIT_WITH_STATUS &&
+ if (!opt->flags.exit_with_status &&
check_pager_config("diff") != 0)
setup_pager();
}
#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 pickaxe_ignore_case:1;
+ unsigned default_follow_renames:1;
};
static inline void diff_flags_or(struct diff_flags *a,
if (!DIFF_FILE_VALID(p->one) && !DIFF_FILE_VALID(p->two))
return 0;
- if (o->flags.ALLOW_TEXTCONV) {
+ if (o->flags.allow_textconv) {
textconv_one = get_textconv(p->one);
textconv_two = get_textconv(p->two);
}
if (opts & (DIFF_PICKAXE_REGEX | DIFF_PICKAXE_KIND_G)) {
int cflags = REG_EXTENDED | REG_NEWLINE;
- if (o->flags.PICKAXE_IGNORE_CASE)
+ if (o->flags.pickaxe_ignore_case)
cflags |= REG_ICASE;
regcomp_or_die(®ex, needle, cflags);
regexp = ®ex;
- } else if (o->flags.PICKAXE_IGNORE_CASE &&
+ } else if (o->flags.pickaxe_ignore_case &&
has_non_ascii(needle)) {
struct strbuf sb = STRBUF_INIT;
int cflags = REG_NEWLINE | REG_ICASE;
strbuf_release(&sb);
regexp = ®ex;
} else {
- kws = kwsalloc(o->flags.PICKAXE_IGNORE_CASE
+ kws = kwsalloc(o->flags.pickaxe_ignore_case
? tolower_trans_tbl : NULL);
kwsincr(kws, needle, strlen(needle));
kwsprep(kws);
num_src > num_create ? num_src : num_create;
/* Are we running under -C -C? */
- if (!options->flags.FIND_COPIES_HARDER)
+ if (!options->flags.find_copies_harder)
return 1;
/* Would we bust the limit if we were running under -C? */
else if (options->single_follow &&
strcmp(options->single_follow, p->two->path))
continue; /* not interested */
- else if (!options->flags.RENAME_EMPTY &&
+ else if (!options->flags.rename_empty &&
is_empty_blob_oid(&p->two->oid))
continue;
else if (add_rename_dst(p->two) < 0) {
goto cleanup;
}
}
- else if (!options->flags.RENAME_EMPTY &&
+ else if (!options->flags.rename_empty &&
is_empty_blob_oid(&p->one->oid))
continue;
else if (!DIFF_PAIR_UNMERGED(p) && !DIFF_FILE_VALID(p->two)) {
struct commit_list *parents;
struct object_id *oid;
- if (!opt->diff && !opt->diffopt.flags.EXIT_WITH_STATUS)
+ if (!opt->diff && !opt->diffopt.flags.exit_with_status)
return 0;
parse_commit_or_die(commit);
return renames;
diff_setup(&opts);
- opts.flags.RECURSIVE = 1;
- opts.flags.RENAME_EMPTY = 0;
+ opts.flags.recursive = 1;
+ opts.flags.rename_empty = 0;
opts.detect_rename = DIFF_DETECT_RENAME;
opts.rename_limit = o->merge_rename_limit >= 0 ? o->merge_rename_limit :
o->diff_rename_limit >= 0 ? o->diff_rename_limit :
oid_to_hex(base), oid_to_hex(remote));
diff_setup(&opt);
- opt.flags.RECURSIVE = 1;
+ opt.flags.recursive = 1;
opt.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_setup_done(&opt);
diff_tree_oid(base, remote, "", &opt);
len, oid_to_hex(base), oid_to_hex(local));
diff_setup(&opt);
- opt.flags.RECURSIVE = 1;
+ opt.flags.recursive = 1;
opt.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_setup_done(&opt);
diff_tree_oid(base, local, "", &opt);
memset(ids, 0, sizeof(*ids));
diff_setup(&ids->diffopts);
ids->diffopts.detect_rename = 0;
- ids->diffopts.flags.RECURSIVE = 1;
+ ids->diffopts.flags.recursive = 1;
diff_setup_done(&ids->diffopts);
hashmap_init(&ids->patches, patch_id_cmp, &ids->diffopts, 256);
return 0;
tree_difference |= diff;
if (tree_difference == REV_TREE_DIFFERENT)
- options->flags.HAS_CHANGES = 1;
+ options->flags.has_changes = 1;
}
static void file_change(struct diff_options *options,
unsigned old_dirty_submodule, unsigned new_dirty_submodule)
{
tree_difference = REV_TREE_DIFFERENT;
- options->flags.HAS_CHANGES = 1;
+ options->flags.has_changes = 1;
}
static int rev_compare_tree(struct rev_info *revs,
}
tree_difference = REV_TREE_SAME;
- revs->pruning.flags.HAS_CHANGES = 0;
+ revs->pruning.flags.has_changes = 0;
if (diff_tree_oid(&t1->object.oid, &t2->object.oid, "",
&revs->pruning) < 0)
return REV_TREE_DIFFERENT;
return 0;
tree_difference = REV_TREE_SAME;
- revs->pruning.flags.HAS_CHANGES = 0;
+ revs->pruning.flags.has_changes = 0;
retval = diff_tree_oid(NULL, &t1->object.oid, "", &revs->pruning);
return retval >= 0 && (tree_difference == REV_TREE_SAME);
revs->abbrev = DEFAULT_ABBREV;
revs->ignore_merges = 1;
revs->simplify_history = 1;
- revs->pruning.flags.RECURSIVE = 1;
- revs->pruning.flags.QUICK = 1;
+ revs->pruning.flags.recursive = 1;
+ revs->pruning.flags.quick = 1;
revs->pruning.add_remove = file_add_remove;
revs->pruning.change = file_change;
revs->sort_order = REV_SORT_IN_GRAPH_ORDER;
die("--unpacked=<packfile> no longer supported.");
} else if (!strcmp(arg, "-r")) {
revs->diff = 1;
- revs->diffopt.flags.RECURSIVE = 1;
+ revs->diffopt.flags.recursive = 1;
} else if (!strcmp(arg, "-t")) {
revs->diff = 1;
- revs->diffopt.flags.RECURSIVE = 1;
- revs->diffopt.flags.TREE_IN_RECURSIVE = 1;
+ revs->diffopt.flags.recursive = 1;
+ revs->diffopt.flags.tree_in_recursive = 1;
} else if (!strcmp(arg, "-m")) {
revs->ignore_merges = 0;
} else if (!strcmp(arg, "-c")) {
revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_ERE;
} else if (!strcmp(arg, "--regexp-ignore-case") || !strcmp(arg, "-i")) {
revs->grep_filter.ignore_case = 1;
- revs->diffopt.flags.PICKAXE_IGNORE_CASE = 1;
+ revs->diffopt.flags.pickaxe_ignore_case = 1;
} else if (!strcmp(arg, "--fixed-strings") || !strcmp(arg, "-F")) {
revs->grep_filter.pattern_type_option = GREP_PATTERN_TYPE_FIXED;
} else if (!strcmp(arg, "--perl-regexp") || !strcmp(arg, "-P")) {
/* Pickaxe, diff-filter and rename following need diffs */
if (revs->diffopt.pickaxe ||
revs->diffopt.filter ||
- revs->diffopt.flags.FOLLOW_RENAMES)
+ revs->diffopt.flags.follow_renames)
revs->diff = 1;
if (revs->topo_order)
if (revs->prune_data.nr) {
copy_pathspec(&revs->pruning.pathspec, &revs->prune_data);
/* Can't prune commits with rename following: the paths change.. */
- if (!revs->diffopt.flags.FOLLOW_RENAMES)
+ if (!revs->diffopt.flags.follow_renames)
revs->prune = 1;
if (!revs->full_diff)
copy_pathspec(&revs->diffopt.pathspec,
if (ignore)
handle_ignore_submodules_arg(diffopt, ignore);
else if (is_gitmodules_unmerged(&the_index))
- diffopt->flags.IGNORE_SUBMODULES = 1;
+ diffopt->flags.ignore_submodules = 1;
}
}
void handle_ignore_submodules_arg(struct diff_options *diffopt,
const char *arg)
{
- diffopt->flags.IGNORE_SUBMODULES = 0;
- diffopt->flags.IGNORE_UNTRACKED_IN_SUBMODULES = 0;
- diffopt->flags.IGNORE_DIRTY_SUBMODULES = 0;
+ diffopt->flags.ignore_submodules = 0;
+ diffopt->flags.ignore_untracked_in_submodules = 0;
+ diffopt->flags.ignore_dirty_submodules = 0;
if (!strcmp(arg, "all"))
- diffopt->flags.IGNORE_SUBMODULES = 1;
+ diffopt->flags.ignore_submodules = 1;
else if (!strcmp(arg, "untracked"))
- diffopt->flags.IGNORE_UNTRACKED_IN_SUBMODULES = 1;
+ diffopt->flags.ignore_untracked_in_submodules = 1;
else if (!strcmp(arg, "dirty"))
- diffopt->flags.IGNORE_DIRTY_SUBMODULES = 1;
+ diffopt->flags.ignore_dirty_submodules = 1;
else if (strcmp(arg, "none"))
die("bad --ignore-submodules argument: %s", arg);
}
argv_array_pushf(&cp.args, "--color=%s", want_color(o->use_color) ?
"always" : "never");
- if (o->flags.REVERSE_DIFF) {
+ if (o->flags.reverse_diff) {
argv_array_pushf(&cp.args, "--src-prefix=%s%s/",
o->b_prefix, path);
argv_array_pushf(&cp.args, "--dst-prefix=%s%s/",
mode = 0;
}
- if (opt->flags.RECURSIVE && isdir) {
+ if (opt->flags.recursive && isdir) {
recurse = 1;
- emitthis = opt->flags.TREE_IN_RECURSIVE;
+ emitthis = opt->flags.tree_in_recursive;
}
if (emitthis) {
ttree = fill_tree_descriptor(&t, oid);
/* Enable recursion indefinitely */
- opt->pathspec.recursive = opt->flags.RECURSIVE;
+ opt->pathspec.recursive = opt->flags.recursive;
for (;;) {
int imin, cmp;
/* t = p[imin] */
if (cmp == 0) {
/* are either pi > p[imin] or diff(t,pi) != ø ? */
- if (!opt->flags.FIND_COPIES_HARDER) {
+ if (!opt->flags.find_copies_harder) {
for (i = 0; i < nparent; ++i) {
/* p[i] > p[imin] */
if (tp[i].entry.mode & S_IFXMIN_NEQ)
/* t > p[imin] */
else {
/* ∀i pi=p[imin] -> D += "-p[imin]" */
- if (!opt->flags.FIND_COPIES_HARDER) {
+ if (!opt->flags.find_copies_harder) {
for (i = 0; i < nparent; ++i)
if (tp[i].entry.mode & S_IFXMIN_NEQ)
goto skip_emit_tp;
q->nr = 0;
diff_setup(&diff_opts);
- diff_opts.flags.RECURSIVE = 1;
- diff_opts.flags.FIND_COPIES_HARDER = 1;
+ diff_opts.flags.recursive = 1;
+ diff_opts.flags.find_copies_harder = 1;
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_opts.single_follow = opt->pathspec.items[0].match;
diff_opts.break_opt = opt->break_opt;
strbuf_addstr(&base, base_str);
retval = ll_diff_tree_oid(old_oid, new_oid, &base, opt);
- if (!*base_str && opt->flags.FOLLOW_RENAMES && diff_might_be_rename())
+ if (!*base_str && opt->flags.follow_renames && diff_might_be_rename())
try_to_follow_renames(old_oid, new_oid, &base, opt);
strbuf_release(&base);
init_revisions(&rev, NULL);
setup_revisions(0, NULL, &rev, NULL);
rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
- rev.diffopt.flags.DIRTY_SUBMODULES = 1;
+ rev.diffopt.flags.dirty_submodules = 1;
rev.diffopt.ita_invisible_in_index = 1;
if (!s->show_untracked_files)
- rev.diffopt.flags.IGNORE_UNTRACKED_IN_SUBMODULES = 1;
+ rev.diffopt.flags.ignore_untracked_in_submodules = 1;
if (s->ignore_submodule_arg) {
- rev.diffopt.flags.OVERRIDE_SUBMODULE_CONFIG = 1;
+ rev.diffopt.flags.override_submodule_config = 1;
handle_ignore_submodules_arg(&rev.diffopt, s->ignore_submodule_arg);
}
rev.diffopt.format_callback = wt_status_collect_changed_cb;
opt.def = s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference;
setup_revisions(0, NULL, &rev, &opt);
- rev.diffopt.flags.OVERRIDE_SUBMODULE_CONFIG = 1;
+ rev.diffopt.flags.override_submodule_config = 1;
rev.diffopt.ita_invisible_in_index = 1;
if (s->ignore_submodule_arg) {
handle_ignore_submodules_arg(&rev.diffopt, s->ignore_submodule_arg);
const char *c = color(WT_STATUS_HEADER, s);
init_revisions(&rev, NULL);
- rev.diffopt.flags.ALLOW_TEXTCONV = 1;
+ rev.diffopt.flags.allow_textconv = 1;
rev.diffopt.ita_invisible_in_index = 1;
memset(&opt, 0, sizeof(opt));
init_revisions(&rev_info, NULL);
if (ignore_submodules)
- rev_info.diffopt.flags.IGNORE_SUBMODULES = 1;
- rev_info.diffopt.flags.QUICK = 1;
+ rev_info.diffopt.flags.ignore_submodules = 1;
+ rev_info.diffopt.flags.quick = 1;
diff_setup_done(&rev_info.diffopt);
result = run_diff_files(&rev_info, 0);
return diff_result_code(&rev_info.diffopt, result);
init_revisions(&rev_info, NULL);
if (ignore_submodules)
- rev_info.diffopt.flags.IGNORE_SUBMODULES = 1;
- rev_info.diffopt.flags.QUICK = 1;
+ rev_info.diffopt.flags.ignore_submodules = 1;
+ rev_info.diffopt.flags.quick = 1;
add_head_to_pending(&rev_info);
diff_setup_done(&rev_info.diffopt);
result = run_diff_index(&rev_info, 1);