aboutsummaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/commit.c7
-rw-r--r--builtin/log.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index d75b3805ea..960e7ac081 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -912,11 +912,12 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
* submodules which were manually staged, which would
* be really confusing.
*/
- int diff_flags = DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG;
+ struct diff_flags flags = DIFF_FLAGS_INIT;
+ flags.OVERRIDE_SUBMODULE_CONFIG = 1;
if (ignore_submodule_arg &&
!strcmp(ignore_submodule_arg, "all"))
- diff_flags |= DIFF_OPT_IGNORE_SUBMODULES;
- commitable = index_differs_from(parent, diff_flags, 1);
+ flags.IGNORE_SUBMODULES = 1;
+ commitable = index_differs_from(parent, &flags, 1);
}
}
strbuf_release(&committer_ident);
diff --git a/builtin/log.c b/builtin/log.c
index d81a09051e..dc28d43eb7 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -134,7 +134,8 @@ static void cmd_log_init_defaults(struct rev_info *rev)
if (default_date_mode)
parse_date_format(default_date_mode, &rev->date_mode);
- rev->diffopt.touched_flags = 0;
+
+ memset(&rev->diffopt.touched_flags, 0, sizeof(struct diff_flags));
}
static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,