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

Re: [PATCH] notes: remove trailing whitespace from editor template

From
D. Ben Knoble <ben.knoble@gmail.com>
Date
Jun 10, 2025, 21:11 UTC
Message-ID
<CALnO6CB+ZBChPg0CLXO+i3AUEwiiF7z5euXa4N3Yh4FoEX4A4w@mail.gmail.com>
In-Reply-To
<5ca4e740-d243-490c-ad85-13b330165365@app.fastmail.com>

On Mon, Jun 9, 2025 at 5:13 PM Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:

Show 28 quoted lines
>
> On Tue, Jun 3, 2025, at 22:37, D. Ben Knoble wrote:
> >> In this case I am not all that sympathetic to the idea of the patch.
> >> The consistently indented lines makes it more clear from which line
> >> to which line came from a commit log message; running stripspace
> >> would break them into paragraph pieces.  These editors that complain
> >> probaly can be fixed?
> >
> > My editor doesn't complain, but it does highlight trailing whitespace
> > at my behest, and it tends to be an eyesore (on purpose: that way I
> > clean it up). Perhaps Kistoffer is coming from a similar place?
>
> Yes exactly.  Ain’t nothing more to it than that.  :)
> >
> >>
> >> Alternatively, if it bothers users of certain editing environments
> >> too much, perhaps the indent code in the output phase of "git show"
> >> should lose the indents for empty lines uniformly, shoudln't it?  It
> >> probably should be a fairly isolated change, like the way how the
> >> expand_tabs_in_log bit is handled in pretty.c; give another bit and
> >> teach pp_handle_indent to return when that bit is set and the
> >> payload it was asked to show with indentation is empty, or something
> >> like that.
> >
> > I think this suggestion would also help folks who "git commit -v,"
> > which IIRC is also indented in the template.
>
> In my testing though it doesn’t introduce trailing whitespace.

Really? When committing a recent patch (editor template attached) with -v (for testing this), I saw trailing whitespace on the blank line under the added feed.

>
> --
> Kristoffer Haugsbakk
-- 
D. Ben Knoble


news: add new feed
; Veuillez saisir le message de validation pour vos modifications. Les lignes
; commençant par ';' seront ignorées, et un message vide abandonne la validation.
;
; Sur la branche master
; Votre branche est à jour avec 'origin/master'.
;
; Modifications qui seront validées :
;	modifié :         links/newsboat/urls
;
; Fichiers non suivis:
;	links/bin/git-stack
;
; ------------------------ >8 ------------------------
; Ne touchez pas à la ligne ci-dessus.
; Tout ce qui suit sera éliminé.
diff --git c/links/newsboat/urls i/links/newsboat/urls
index 522d955d..d192de8b 100644
--- c/links/newsboat/urls
+++ i/links/newsboat/urls
@@ -21,6 +21,7 @@ https://ln.ht/_/feed/~ddevault "tech"
 https://maia.crimew.gay/feed.xml "tech"
 https://www.felienne.com/feed "tech"
 https://ronjeffries.com/feed.xml "tech"
+https://eev.ee/feeds/rss.xml "tech"
 
 http://journal.stuffwithstuff.com/rss.xml "~Bob Nystrom" "tech"
 https://blog.sanctum.geek.nz/feed/ "tech"
Previous: Kristoffer HaugsbakkNext: Junio C Hamano
Message 16 of 17 in “notes: remove trailing whitespace from editor template”
  1. notes: remove trailing whitespace from editor templatekristofferhaugsbakk@fastmail.com, May 24, 2025
  2. Kristoffer HaugsbakkMay 25, 2025
  3. Phillip WoodMay 26, 2025
  4. Kristoffer HaugsbakkMay 26, 2025
  5. Phillip WoodMay 27, 2025
  6. Kristoffer HaugsbakkMay 27, 2025
  7. Junio C HamanoMay 27, 2025
  8. Eric SunshineMay 27, 2025
  9. Kristoffer HaugsbakkMay 27, 2025
  10. Junio C HamanoMay 27, 2025
  11. Phillip WoodJun 2, 2025
  12. D. Ben KnobleJun 3, 2025
  13. Eric SunshineJun 3, 2025
  14. Kristoffer HaugsbakkJun 9, 2025
  15. Kristoffer HaugsbakkJun 9, 2025
  16. D. Ben KnobleJun 10, 2025
  17. Junio C HamanoJun 10, 2025

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.