Re: [PATCH] Initialize notes trees if %N is used and no --show-notes given
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Apr 6, 2010, 11:52 UTC
- Message-ID
- <201004061352.21945.trast@student.ethz.ch>
- In-Reply-To
- <20100406111904.GA46425@macbook.lan.lan>
Johannes Gilger wrote:
Show 10 quoted lines
> > The first option would be confusing. I, for one, would simply put %N in > my log and never really know that existing notes aren't displayed. I > wasn't even sure my git.git checkout had notes, so I created one myself. > A better behaviour would be to not expand %N if notes are disabled, so a > user gets some kind of feedback that %N isn't working. > > 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.
One thing I didn't consider in my other mail was that --pretty automatically disables notes. I think in my plan (%N expands to nothing with --no-notes) this would have to change to the effect that --pretty only disables the *normal* note-showing code, but still initializes according to the same rules.
I'll have to check whether that amounts to the same as "silent initialization".
> As for the builtin formats I was under the impressions that they worked > completely outside the parser for placeholders, so one would not use > '%N' in a builtin format, and %N initializing the notes would not > conflict with --no-notes and builtin formats.
That's true, which is why I said "notionally".
--
Thomas Rast
trast@{inf,student}.ethz.ch