Re: [PATCH] Initialize notes trees if %N is used and no --show-notes given
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 7, 2010, 06:18 UTC
- Message-ID
- <7v39z7g4zp.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <201004061352.21945.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 6 quoted lines
>> I'd really like %N to do the initialization. There is no other >> placeholder which requires an extra option to work, if I see it >> correctly. > > %g[dDs] expand to nothing unless the log command walks reflogs, so > there is some precedent.
As Peff pointed out, %d does things lazily, but I suspect it might be hard to do a similar initialization for %N.
I wonder if we can inspect-but-not-use format string before we even start walking, to see if we need notes (when we see %N).
None of the abouve applies to %g because making it cause reflog walking will change not only the output, but the fundamental behaviour of the command.