Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/
Date: Fri, 18 Jun 2021 06:14:22
Message-Id: 1623996756.39680e44ae7267f09465cef26f156195e55e6483.ulm@gentoo
1 commit: 39680e44ae7267f09465cef26f156195e55e6483
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 10 00:15:09 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 18 06:12:36 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=39680e44
7
8 ebuild-writing/misc-files/patches: discourage adding comments within patch
9
10 We shouldn't add comments (#) within patch changes to source code
11 (etc) because it's unnecessary noise. Comments *at the top* of the
12 patch are, of course, welcoome.
13
14 Closes: https://github.com/gentoo/devmanual/pull/217
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
17
18 ebuild-writing/misc-files/patches/text.xml | 8 ++++++++
19 1 file changed, 8 insertions(+)
20
21 diff --git a/ebuild-writing/misc-files/patches/text.xml b/ebuild-writing/misc-files/patches/text.xml
22 index 8d54dfd..05052e6 100644
23 --- a/ebuild-writing/misc-files/patches/text.xml
24 +++ b/ebuild-writing/misc-files/patches/text.xml
25 @@ -293,6 +293,14 @@ files automatically. Alternatively, you can specify the <c>-E</c> option with
26 <c>eapply</c> if you want to remove an empty file.
27 </p>
28
29 +<p>
30 +Removed lines should not appear in the patch because they are commented <d/>
31 +just remove them entirely. Patches show removed lines by prefixing them with
32 +a <c>-</c>, so no information is lost by simply deleting lines rather than
33 +commenting them out (which adds noise). This makes the patch shorter and
34 +more readable.
35 +</p>
36 +
37 <p>
38 The following function (for your interactive shell, not for the ebuild) will
39 help deleting these things: