Skip to content

Commit 87869b3

Browse files
esyrldv-alt
andcommitted
doc: update commit requirements
* README-hacking (Requirements): Enhance phrasing. (Commit log requirements): Rename to "Commit requirements", describe "absence of whitespace errors" requirement, add references to the Linux kernel coding style and scripts/checkpatch.pl script. Co-Authored-by: Dmitry V. Levin <[email protected]>
1 parent 4bb8454 commit 87869b3

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

README-hacking

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Requirements
22
============
3-
If you use the GIT version of strace, please refer to INSTALL-git.md file.
3+
If you use a GIT version of strace source code, please refer to
4+
INSTALL-git.md file for building and installation instructions.
45

56

67
No more ChangeLog file
@@ -13,13 +14,28 @@ the top-level ChangeLog file from logs at "make dist" time. As such,
1314
there are strict requirements on the form of the commit log messages.
1415

1516

16-
Commit log requirements
17-
=======================
18-
Each commit log should always start with a one-line summary, the second
17+
Commit requirements
18+
===================
19+
Each commit message should always start with a one-line summary, the second
1920
line should be blank, and the remaining lines are usually ChangeLog-style
2021
entries for all affected files, except the leading TABs which should
2122
be omitted.
2223

24+
Changes must not introduce whitespace errors in git sense (trailing
25+
whitespace, spaces before tabs, spaces for indentation, blank lines
26+
at the end of file), this can be checked with the following command:
27+
28+
git -c core.whitespace=space-before-tab,trailing-space diff-index \
29+
--check 4b825dc642cb6eb9a060e54bf8d69288fbee4904
30+
31+
It is also preferred (but not required) that commit patches pass
32+
scripts/checkpatch.pl script from the Linux kernel[1], as currently established
33+
coding style quite closely resembles the one used in Linux kernel[2], with some
34+
exceptions.
35+
36+
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/checkpatch.pl
37+
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/coding-style.rst
38+
2339

2440
Documentation
2541
=============

0 commit comments

Comments
 (0)