git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-log --format missing trailing newline character

From
ACAlejandro 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/>
Previous: Junio C Hamano
Message 7 of 7 in “git-log --format missing trailing newline character”
  1. Alejandro ColomarDec 23, 2024
  2. Kristoffer HaugsbakkDec 23, 2024
  3. Alejandro ColomarDec 23, 2024
  4. Andreas SchwabDec 23, 2024
  5. Alejandro ColomarDec 23, 2024
  6. Junio C HamanoDec 26, 2024
  7. Alejandro ColomarDec 26, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.