Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Adding "--ignore-submodules" switch to git-describe

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:20

Francis Moreau [off-list ref] writes:
quoted
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
         working trees.

    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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help