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 <ldv@altlinux.org>
This commit is contained in:
Eugene Syromyatnikov 2018-03-14 20:43:47 +01:00 committed by Dmitry V. Levin
parent 4bb845478c
commit 87869b3ac2

View File

@ -1,6 +1,7 @@
Requirements Requirements
============ ============
If you use the GIT version of strace, please refer to INSTALL-git.md file. If you use a GIT version of strace source code, please refer to
INSTALL-git.md file for building and installation instructions.
No more ChangeLog file No more ChangeLog file
@ -13,13 +14,28 @@ the top-level ChangeLog file from logs at "make dist" time. As such,
there are strict requirements on the form of the commit log messages. there are strict requirements on the form of the commit log messages.
Commit log requirements Commit requirements
======================= ===================
Each commit log should always start with a one-line summary, the second Each commit message should always start with a one-line summary, the second
line should be blank, and the remaining lines are usually ChangeLog-style line should be blank, and the remaining lines are usually ChangeLog-style
entries for all affected files, except the leading TABs which should entries for all affected files, except the leading TABs which should
be omitted. be omitted.
Changes must not introduce whitespace errors in git sense (trailing
whitespace, spaces before tabs, spaces for indentation, blank lines
at the end of file), this can be checked with the following command:
git -c core.whitespace=space-before-tab,trailing-space diff-index \
--check 4b825dc642cb6eb9a060e54bf8d69288fbee4904
It is also preferred (but not required) that commit patches pass
scripts/checkpatch.pl script from the Linux kernel[1], as currently established
coding style quite closely resembles the one used in Linux kernel[2], with some
exceptions.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/checkpatch.pl
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/coding-style.rst
Documentation Documentation
============= =============