From: Junio C Hamano Date: Wed, 07 Apr 2010 06:18:34 GMT Subject: Re: [PATCH] Initialize notes trees if %N is used and no --show-notes given Message-ID: <7v39z7g4zp.fsf@alter.siamese.dyndns.org> In-Reply-To: <201004061352.21945.trast@student.ethz.ch> Thomas Rast writes: >> 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.