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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 26, 2024, 16:00 UTC
Message-ID
<xmqq4j2qzb6d.fsf@gitster.g>
In-Reply-To
<elrdfos3fkzjdmhvyxbshsbt6nw723mr3m7blw7ghghnresxi6@vvj7u6jwlgur>
Alejandro Colomar <alx@kernel.org> writes:
Show 9 quoted lines
> 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".

Previous: Alejandro ColomarNext: Alejandro Colomar
Message 6 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.