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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 01.03.2013 18:46, schrieb Junio C Hamano:
> 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.
>
> And then when "--do-not-ignore-untracked" is in effect, we should
> report a "dirty" revision when the working tree of the superproject
> or any of the submodule working trees has untracked cruft.

I agree with your analysis. What about teaching describe the
"-u|--untracked-files" option which status already knows? The
two modes could be "no" and "yes" here (as the distinction
between "normal" and "all" doesn't make any sense for describe).
Current default would be "no", using "-u" alone would set mode to
"yes".

> You might want to argue, in the longer term, that the default should
> be "--do-not-ignore-untracked" and people who want the current
> toplevel behaviour should ask it with "--ignore-untracked".  I am
> somewhat sympathetic to that position, but I do not think it is
> practical.  People are not perfect and they do keep untracked and
> unignored paths in the working tree; ignoring untracked paths does
> have an excuse to be the default from practical point of view.

I think the default mostly depends on the habits of the people
using a repo. Personally I would lean towards making "-uyes" the
default, because in my experience untracked files can make a huge
difference when you later try to reproduce a certain version and
its behavior (and additionally that is just what status already
uses as default). But I won't care that much about the default if
we would just reuse the "status.showUntrackedFiles" config option
to set the default for describe too. This should allow to set the
policy per repo or globally to peoples taste. Does that make sense?

> But when we ignore untracked paths in the superproject, we should
> ignore untracked paths in submodule working trees consistently.

Definitely (we fixed that for status some time ago in 3bfc45047).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]