diff options
author | Brandon Williams <bmwill@google.com> | 2017-10-31 19:19:11 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-01 03:51:40 +0100 |
commit | 0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b (patch) | |
tree | 16c48f9b73752aca718be9778ebacbef0ef3d984 /diff-lib.c | |
parent | diff: remove DIFF_OPT_CLR macro (diff) | |
download | git-0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b.tar.xz git-0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b.zip |
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>
Diffstat (limited to 'diff-lib.c')
-rw-r--r-- | diff-lib.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/diff-lib.c b/diff-lib.c index f1cc3fd510..d373358a5a 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -72,14 +72,14 @@ static int match_stat_with_submodule(struct diff_options *diffopt, 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; @@ -229,7 +229,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option) 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; @@ -363,7 +363,7 @@ static int show_modified(struct rev_info *revs, 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, @@ -494,7 +494,7 @@ static int diff_cache(struct rev_info *revs, 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; @@ -545,12 +545,12 @@ int index_differs_from(const char *def, const struct diff_flags *flags, 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); } |