Merge branch 'sj/untracked-files-in-submodule-directory-is-not-dirty'
"git diff" showed a submodule working tree with untracked cruft as "Submodule commit <objectname>-dirty", but a natural expectation is that the "-dirty" indicator would align with "git describe --dirty", which does not consider having untracked files in the working tree as source of dirtiness. The inconsistency has been fixed. * sj/untracked-files-in-submodule-directory-is-not-dirty: diff: do not show submodule with untracked files as "-dirty"
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user