From: Jakob Meng <c...@jakobmeng.de>

A patch created with 'git format-patch' can contain trailing spaces.
When editing a patch, e.g. to fix a typo in the title, the trailing
spaces should not be removed. This becomes tricky when editors like
Kate identify a space followed by form feed as a trailing space and
remove both. This will result in a broken patch which cannot be applied
cleanly. Although this case should likely be considered a editor bug,
keeping trailing spaces in a patch is the right thing to do and also
helps mitigating these kinds of editor bugs.

Fixes: 07f6d6a0cb51 ("Add editorconfig file.")

Signed-off-by: Jakob Meng <c...@jakobmeng.de>
---
 .editorconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.editorconfig b/.editorconfig
index 685c72750..5be5415da 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -13,6 +13,10 @@ indent_style = space
 indent_size = 4
 max_line_length = 79
 
+[*.{patch,diff}]
+insert_final_newline = false
+trim_trailing_whitespace = false
+
 [include/linux/**.h]
 indent_style = tab
 indent_size = tab
-- 
2.39.2

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to