diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-01-25 23:19:18 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-25 23:19:18 +0100 |
commit | 080627942802e767b068a491f3d349227f4e2cdc (patch) | |
tree | e229ae62bfe315afc0d784b3752958f981b46d96 /submodule.c | |
parent | Merge branch 'jc/deprecate-pack-redundant' (diff) | |
parent | diff: do not show submodule with untracked files as "-dirty" (diff) | |
download | git-080627942802e767b068a491f3d349227f4e2cdc.tar.xz git-080627942802e767b068a491f3d349227f4e2cdc.zip |
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"
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/submodule.c b/submodule.c index b561445329..9767ba9893 100644 --- a/submodule.c +++ b/submodule.c @@ -420,6 +420,7 @@ const char *submodule_strategy_to_string(const struct submodule_update_strategy void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *arg) { + diffopt->flags.ignore_submodule_set = 1; diffopt->flags.ignore_submodules = 0; diffopt->flags.ignore_untracked_in_submodules = 0; diffopt->flags.ignore_dirty_submodules = 0; |