diff options
author | Brandon Williams <bmwill@google.com> | 2017-10-31 11:19:11 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-01 11:51:40 +0900 |
commit | 0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b (patch) | |
tree | 16c48f9b73752aca718be9778ebacbef0ef3d984 /revision.c | |
parent | b2100e529171f0bbd497366618436cf86c08a324 (diff) | |
download | git-0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b.tar.gz |
diff: make struct diff_flags members lowercasebw/diff-opt-impl-to-bitfields
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>
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/revision.c b/revision.c index 6bb8735014..bfde5b0cd5 100644 --- a/revision.c +++ b/revision.c @@ -410,7 +410,7 @@ static void file_add_remove(struct diff_options *options, 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, @@ -422,7 +422,7 @@ 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, @@ -455,7 +455,7 @@ 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; @@ -471,7 +471,7 @@ static int rev_same_tree_as_empty(struct rev_info *revs, struct commit *commit) 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); @@ -1403,8 +1403,8 @@ void init_revisions(struct rev_info *revs, const char *prefix) 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; @@ -1917,11 +1917,11 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg 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")) { @@ -2066,7 +2066,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg 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")) { @@ -2399,7 +2399,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s /* 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) @@ -2408,7 +2408,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s 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, |