Re: [PATCH] builtin/describe.c: ignore untracked changes in submodules

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

 



>>Brandon Casey <casey@xxxxxxxxxxxxxxx> writes:
>>
>>> From: Brandon Casey <drafnel@xxxxxxxxx>
>>>
>>> Since 'git describe' does not append -dirty to the version string it
>>> produces when untracked files exist in the working directory of the main
>>> repository, it should not do so for submodules either.
>>>
>>> Add --ignore-submodules=untracked to the call to diff-index which is used
>>> to decide whether or not the '-dirty' string is necessary.
>>>
>>> Signed-off-by: Brandon Casey <casey@xxxxxxxxxxxxxxx>
>>> ---
>>
>>Hmm, this changes the behaviour in a big way but it probably is for the
>>better.  At least it is consistent with the recent fixes to the
>>interaction between diff and submodules.
>
>Hmm, by default the diff family considers submodules with untracked files as
>dirty unless configured otherwise (and AFAICS the recent fixes to the interaction
>between diff and submodule were options to configure your own default).
>
>So when git status tells you the subodule is modified, e.g. because of an untracked
>file, I would expect git describe to add '-dirty' to its output when requested. To get rid
>of that I would expect you either fix the .gitignore of the submodule or configure that
>you don't care about untracked files in submodules at all (either only for this
>submodule or in the config).
>
>So if I didn't misunderstand something here I would rather vote against this change,
>git describe should append a '-dirty' when git status would show modifications, no?

And maybe we should teach "git describe" the "--ignore-submodules" option, then
you could tell describe what to pass to the diff-index command. Thoughts?
--
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]