Re: [PATCH 4/4] cherry-pick: Add `--empty` for more robust redundant commit handling
- From
Kristoffer Haugsbakk <code@khaugsbakk.name>
- Date
- Jan 22, 2024, 20:55 UTC
- Message-ID
- <10838549-c364-429b-a086-68a41b7369de@app.fastmail.com>
- In-Reply-To
- <CAHPHrSddqTEjtfhgVJ=vmRhbtuwXcGEiE1KFZqR1QhKw-HDtSg@mail.gmail.com>
On Sun, Jan 21, 2024, at 19:28, Brian Lyles wrote:
Show 9 quoted lines
> Thank you -- This will be corrected with v2. > > Is the sample pre-commit hook the ideal way to prevent this in the > future? Or is there some config I could set globally to enforce this > across repositories? I was having a little trouble finding a good way to > accomplish this globally. > > Thanks, > Brian Lyles
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/
-- Kristoffer Haugsbakk