Francis Moreau <francis.m...@gmail.com> writes:
>> But when we ignore untracked paths in the superproject, we should
>> ignore untracked paths in submodule working trees consistently.
> yes I agree.
> But in the short term, could you suggest a method to workaround this
> inconsistency ?
Hrm, ... didn't I already?
As we do not take untracked content at the superproject level into
account when deciding "--dirty"-ness, I think it is very sensible to
either do one of the following:
(1) always ignore untracked files in submodule working trees; or
(2) if we were to introduce some form of --ignore-submodules,
ignore untracked files in the superproject working tree when we
use that mechanism to ignore untracked files in submodule
Strictly speaking, (1) is a degenerate case of (2).
I think what is missing from "--dirty" is not "--ignore-submodules",
but "--do-not-ignore-untracked" option [*1*]. "describe --dirty"
ignores untracked files in the superproject by default, and we
should ignore untracked files in submodule working trees, but the
current code does not. Fixing that is (1) above.
I think the right first step without any new option is to make
"describe --dirty" to ignore the dirtiness in submodules coming
solely from having untracked files in submodules' working trees.
You could later add --having-untracked-is-dirty option to mark the
output dirty when there is an untracked file in submodules' working
trees or the toplevel working tree, which would be the second step.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html