diff: make struct diff_flags members lowercase
Now that the flags stored in struct diff_flags are being accessed directly and not through macros, change all struct members from being uppercase to lowercase. This conversion is done using the following semantic patch: @@ expression E; @@ - E.RECURSIVE + E.recursive @@ expression E; @@ - E.TREE_IN_RECURSIVE + E.tree_in_recursive @@ expression E; @@ - E.BINARY + E.binary @@ expression E; @@ - E.TEXT + E.text @@ expression E; @@ - E.FULL_INDEX + E.full_index @@ expression E; @@ - E.SILENT_ON_REMOVE + E.silent_on_remove @@ expression E; @@ - E.FIND_COPIES_HARDER + E.find_copies_harder @@ expression E; @@ - E.FOLLOW_RENAMES + E.follow_renames @@ expression E; @@ - E.RENAME_EMPTY + E.rename_empty @@ expression E; @@ - E.HAS_CHANGES + E.has_changes @@ expression E; @@ - E.QUICK + E.quick @@ expression E; @@ - E.NO_INDEX + E.no_index @@ expression E; @@ - E.ALLOW_EXTERNAL + E.allow_external @@ expression E; @@ - E.EXIT_WITH_STATUS + E.exit_with_status @@ expression E; @@ - E.REVERSE_DIFF + E.reverse_diff @@ expression E; @@ - E.CHECK_FAILED + E.check_failed @@ expression E; @@ - E.RELATIVE_NAME + E.relative_name @@ expression E; @@ - E.IGNORE_SUBMODULES + E.ignore_submodules @@ expression E; @@ - E.DIRSTAT_CUMULATIVE + E.dirstat_cumulative @@ expression E; @@ - E.DIRSTAT_BY_FILE + E.dirstat_by_file @@ expression E; @@ - E.ALLOW_TEXTCONV + E.allow_textconv @@ expression E; @@ - E.TEXTCONV_SET_VIA_CMDLINE + E.textconv_set_via_cmdline @@ expression E; @@ - E.DIFF_FROM_CONTENTS + E.diff_from_contents @@ expression E; @@ - E.DIRTY_SUBMODULES + E.dirty_submodules @@ expression E; @@ - E.IGNORE_UNTRACKED_IN_SUBMODULES + E.ignore_untracked_in_submodules @@ expression E; @@ - E.IGNORE_DIRTY_SUBMODULES + E.ignore_dirty_submodules @@ expression E; @@ - E.OVERRIDE_SUBMODULE_CONFIG + E.override_submodule_config @@ expression E; @@ - E.DIRSTAT_BY_LINE + E.dirstat_by_line @@ expression E; @@ - E.FUNCCONTEXT + E.funccontext @@ expression E; @@ - E.PICKAXE_IGNORE_CASE + E.pickaxe_ignore_case @@ expression E; @@ - E.DEFAULT_FOLLOW_RENAMES + E.default_follow_renames Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b2100e5291
commit
0d1e0e7801
@ -121,16 +121,16 @@ static void cmd_log_init_defaults(struct rev_info *rev)
|
||||
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);
|
||||
@ -181,7 +181,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
|
||||
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)
|
||||
@ -391,7 +391,7 @@ static int cmd_log_walk(struct rev_info *rev)
|
||||
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);
|
||||
@ -483,8 +483,8 @@ static int show_blob_object(const struct object_id *oid, struct rev_info *rev, c
|
||||
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,
|
||||
@ -666,9 +666,9 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
|
||||
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)
|
||||
@ -1340,7 +1340,7 @@ static void prepare_bases(struct base_tree_info *bases,
|
||||
return;
|
||||
|
||||
diff_setup(&diffopt);
|
||||
diffopt.flags.RECURSIVE = 1;
|
||||
diffopt.flags.recursive = 1;
|
||||
diff_setup_done(&diffopt);
|
||||
|
||||
oidcpy(&bases->base_commit, &base->object.oid);
|
||||
@ -1511,7 +1511,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||
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";
|
||||
@ -1612,8 +1612,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||
|
||||
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);
|
||||
|
Reference in New Issue
Block a user