From: Brian Lyles Date: Tue, 23 Jan 2024 05:23:17 GMT Subject: Re: [PATCH 4/4] cherry-pick: Add `--empty` for more robust redundant commit handling Message-ID: In-Reply-To: <10838549-c364-429b-a086-68a41b7369de@app.fastmail.com> On Sun, Jan 21, 2024 at 4:05 PM Kristoffer Haugsbakk wrote: > I don’t know of any global config. So a pre-commit hook is probably the > safest bet. Personally I set all my editors to remove trailing space and > they very seldom mess it up. :) Fair point -- Apparently this was a gap in my nvim config. Easily added. On Mon, Jan 22, 2024 at 2:55 PM Kristoffer Haugsbakk wrote: > Oh, and this thread reminded me https://lore.kernel.org/git/xmqqle8hrtcs.fsf@gitster.g/T/#t > > that editorconfig[1] has this option: > > ``` > trim_trailing_whitespace = true > ``` > > So I guess that should be enough for all editors that respect this > config (although I haven’t tested it). > > 🔗 1: https://editorconfig.org/ Is there a good reason that this should not just be added to the `.editorconfig` in this repository? Would a patch for this be welcome? I do see that there are ~130 files with trailing whitespace in maint today, though I suspect that most of those are not intentional. Brian Lyles