Skip to content

Commit

Permalink
editorconfig: leave patch files alone wrt trainling spaces
Browse files Browse the repository at this point in the history
It is perfectly valid for a patch file to have trailing spaces, when for
example an empty or space-only line is appears in a hunk: if the line if
part of the context, whether it be empty or with only spaces, there will
aways be the leading space introduced by the patch itsef, making for a
sapce-only line; if the line is space-only and removed (or added) that
will also appear as a space-only line.

Currently, our editorconfig wants to unconditionally drop trailing
spaces, so when one edits a patch file to add their SoB and Upstream
tags, such a patch would get badly mangled and would not apply, causing
quite some grief and questioning (sad experience looming in the recent
past here)...

Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
yann-morin-1998 committed Jun 11, 2024
1 parent 8b8f5e3 commit 85736a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ indent_size = tab
indent_style = tab
indent_size = tab

[*.patch]
trim_trailing_whitespace = false

[S{0..9}{0..9}*]
indent_style = tab
indent_size = tab
Expand Down

0 comments on commit 85736a2

Please sign in to comment.