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

Re: [PATCH] notes: avoid empty line in template

From
Jeff King <peff@peff.net>
Date
Nov 17, 2022, 15:12 UTC
Message-ID
<Y3ZPW/seP0auAtKZ@coredump.intra.peff.net>
In-Reply-To
<166867999215.10813.7408480606700051633.git@grubix.eu>
On Thu, Nov 17, 2022 at 11:13:12AM +0100, Michael J Gruber wrote:
Show 7 quoted lines
> > I don't mind the consistency here, but what does "wrong structurally"
> > mean? Doesn't the usual removing of duplicate newlines make this amount
> > to the same?
> 
> I am talking about what we present to the user as a template, and that
> contains two newlines. Whether they will be reduced afterwards depends
> on the cleanup policy.

I wondered if this might actually be a non-cosmetic bug, if you could so something like:

  git notes add --cleanup=only-comments

which would retain the extra newlines. But there is no --cleanup option for git-notes at all (it always calls strbuf_stripspace() internally). And there is no "comments only" cleanup mode; it is either "clean nothing", "clean space but leave comments", or "clean both".

So I think it really is just cosmetic.
-Peff
Previous: Michael J Gruber
Message 6 of 6 in “notes: avoid empty line in template”
  1. notes: avoid empty line in templateMichael J Gruber, Nov 16, 2022
  2. Jeff KingNov 16, 2022
  3. Taylor BlauNov 16, 2022
  4. Ævar Arnfjörð BjarmasonNov 17, 2022
  5. Michael J GruberNov 17, 2022
  6. Jeff KingNov 17, 2022

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.