summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/wt-status.c b/wt-status.c
index 40b59be478..1aed68c43c 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -456,7 +456,7 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q,
it = string_list_insert(&s->change, p->two->path);
d = it->util;
if (!d) {
- d = xcalloc(1, sizeof(*d));
+ CALLOC_ARRAY(d, 1);
it->util = d;
}
if (!d->worktree_status)
@@ -540,7 +540,7 @@ static void wt_status_collect_updated_cb(struct diff_queue_struct *q,
it = string_list_insert(&s->change, p->two->path);
d = it->util;
if (!d) {
- d = xcalloc(1, sizeof(*d));
+ CALLOC_ARRAY(d, 1);
it->util = d;
}
if (!d->index_status)
@@ -606,7 +606,9 @@ static void wt_status_collect_changes_worktree(struct wt_status *s)
if (s->ignore_submodule_arg) {
rev.diffopt.flags.override_submodule_config = 1;
handle_ignore_submodules_arg(&rev.diffopt, s->ignore_submodule_arg);
- }
+ } else if (!rev.diffopt.flags.ignore_submodule_set &&
+ s->show_untracked_files != SHOW_NO_UNTRACKED_FILES)
+ handle_ignore_submodules_arg(&rev.diffopt, "none");
rev.diffopt.format_callback = wt_status_collect_changed_cb;
rev.diffopt.format_callback_data = s;
rev.diffopt.detect_rename = s->detect_rename >= 0 ? s->detect_rename : rev.diffopt.detect_rename;
@@ -669,7 +671,7 @@ static void wt_status_collect_changes_initial(struct wt_status *s)
it = string_list_insert(&s->change, ce->name);
d = it->util;
if (!d) {
- d = xcalloc(1, sizeof(*d));
+ CALLOC_ARRAY(d, 1);
it->util = d;
}
if (ce_stage(ce)) {