aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-10 00:15:09 +0000
committerUlrich Müller <ulm@gentoo.org>2021-06-18 08:12:36 +0200
commit39680e44ae7267f09465cef26f156195e55e6483 (patch)
treef24c8c3b89ba0a777781083a826a334717feb665 /ebuild-writing
parentebuild-writing/misc-files/patches: modernise patch example (diff)
downloaddevmanual-39680e44ae7267f09465cef26f156195e55e6483.tar.gz
devmanual-39680e44ae7267f09465cef26f156195e55e6483.tar.bz2
devmanual-39680e44ae7267f09465cef26f156195e55e6483.zip
ebuild-writing/misc-files/patches: discourage adding comments within patch
We shouldn't add comments (#) within patch changes to source code (etc) because it's unnecessary noise. Comments *at the top* of the patch are, of course, welcoome. Closes: https://github.com/gentoo/devmanual/pull/217 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'ebuild-writing')
-rw-r--r--ebuild-writing/misc-files/patches/text.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/ebuild-writing/misc-files/patches/text.xml b/ebuild-writing/misc-files/patches/text.xml
index 8d54dfd..05052e6 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -294,6 +294,14 @@ files automatically. Alternatively, you can specify the <c>-E</c> option with
</p>
<p>
+Removed lines should not appear in the patch because they are commented <d/>
+just remove them entirely. Patches show removed lines by prefixing them with
+a <c>-</c>, so no information is lost by simply deleting lines rather than
+commenting them out (which adds noise). This makes the patch shorter and
+more readable.
+</p>
+
+<p>
The following function (for your interactive shell, not for the ebuild) will
help deleting these things:
</p>