Re: git-log --format missing trailing newline character
- From
- Alejandro Colomar <alx@kernel.org>
- Date
- Dec 26, 2024, 17:06 UTC
- Message-ID
- <jwatyfdnn65ot2s3i4uhrseh5kbkudsqv2a6bzmz2xncdzly6v@7gi4gmajls3g>
- In-Reply-To
- <xmqq4j2qzb6d.fsf@gitster.g>
Hi Junio,
On Thu, Dec 26, 2024 at 08:00:42AM -0800, Junio C Hamano wrote:
Show 14 quoted lines
> Alejandro Colomar <alx@kernel.org> writes: > > > Hi Andreas, > > > > On Mon, Dec 23, 2024 at 10:09:14PM GMT, Andreas Schwab wrote: > >> On Dez 23 2024, Alejandro Colomar wrote: > >> > >> > Anyway, it feels awkward that git-log(1) skips the last newline whith > >> > --format=format. Should that be fixed? > >> > >> If you want terminator semantics, use tformat: instead of format:. > > Or, "--format=%H" should do the right thing, as that is a mere > short-hand for "--pretty=tformat:%H".
Hmmm. So many times having read that part of the manual, and I had never noticed that. I had never seen that tformat existed, and even less that the default was it (when there's %placeholder string). I had always read 'format' instead of 'tformat'. :)
Thanks!
-- <https://www.alejandro-colomar.es/>