Submodules explicitly added to index by user should be never hidden in
status output.

This also fixes a bug in commit, where submodules with configured ignore
setting (in .gitmodules or .git/config), added to index by user, are not
displayed in the commit message as being commited, but they still are
commited. Unless the changed submodules are the only changes in the index,
in such case commit fails immediately with "no changes", which is even

Signed-off-by: Ronald Weiss <>
 wt-status.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/wt-status.c b/wt-status.c
index a452407..108a048 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -486,10 +486,8 @@ static void wt_status_collect_changes_index(struct 
wt_status *s)
        opt.def = s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference;
        setup_revisions(0, NULL, &rev, &opt);
-       if (s->ignore_submodule_arg) {
-               DIFF_OPT_SET(&rev.diffopt, OVERRIDE_SUBMODULE_CONFIG);
-               handle_ignore_submodules_arg(&rev.diffopt, 
-       }
+       DIFF_OPT_CLR(&rev.diffopt, IGNORE_SUBMODULES);
        rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
        rev.diffopt.format_callback = wt_status_collect_updated_cb;
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to