Re: [PATCH 1/2] pretty: add %(describe)
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 16, 2021, 13:00 UTC
- Message-ID
- <87pn109nhr.fsf@evledraar.gmail.com>
- In-Reply-To
- <5561d11b-08c3-bcf7-5d37-a7d6c6bfb715@web.de>
On Sun, Feb 14 2021, René Scharfe wrote:
> Add a format placeholder for describe output. Implement it by actually > calling git describe, which is simple and guarantees correctness. It's > intended to be used with $Format:...$ in files with the attribute > export-subst and git archive.
Does it really guarantee correctness though? In "builtin/describe.c" we first walk over the refs and use that to format all N items we're asked about.
Under "git log" this is presumably in a race where refs added/deleted during the run of "git log" will change the describe output to be inconsistent with earlier lines.
> It can also be used with git log etc., even though that's going to be > slow due to the fork for each commit.