summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-10-31 18:19:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-01 02:51:40 (GMT)
commit0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b (patch)
tree16c48f9b73752aca718be9778ebacbef0ef3d984 /tree-diff.c
parentb2100e529171f0bbd497366618436cf86c08a324 (diff)
downloadgit-0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b.zip
git-0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b.tar.gz
git-0d1e0e7801bb2ae22036ad09f9f5cec17e08c48b.tar.bz2
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 'tree-diff.c')
-rw-r--r--tree-diff.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tree-diff.c b/tree-diff.c
index b996a23..fe2e466 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -212,9 +212,9 @@ static struct combine_diff_path *emit_path(struct combine_diff_path *p,
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) {
@@ -425,7 +425,7 @@ static struct combine_diff_path *ll_diff_tree_paths(
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;
@@ -484,7 +484,7 @@ static struct combine_diff_path *ll_diff_tree_paths(
/* 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)
@@ -522,7 +522,7 @@ static struct combine_diff_path *ll_diff_tree_paths(
/* 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;
@@ -608,8 +608,8 @@ static void try_to_follow_renames(const struct object_id *old_oid,
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;
@@ -706,7 +706,7 @@ int diff_tree_oid(const struct object_id *old_oid,
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);