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:
3
diff.c
3
diff.c
@ -4593,6 +4593,9 @@ void repo_diff_setup(struct repository *r, struct diff_options *options)
|
||||
|
||||
options->orderfile = diff_order_file_cfg;
|
||||
|
||||
if (!options->flags.ignore_submodule_set)
|
||||
options->flags.ignore_untracked_in_submodules = 1;
|
||||
|
||||
if (diff_no_prefix) {
|
||||
options->a_prefix = options->b_prefix = "";
|
||||
} else if (!diff_mnemonic_prefix) {
|
||||
|
Reference in New Issue
Block a user