From: Eugene Syromyatnikov Date: Wed, 14 Mar 2018 19:43:47 +0000 (+0100) Subject: doc: update commit requirements X-Git-Tag: v4.22~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87869b3ac2a5e7b54cf80e3b1da264ee81c42492;p=strace 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 --- diff --git a/README-hacking b/README-hacking index ff8ce12e..5ee0eda9 100644 --- a/README-hacking +++ b/README-hacking @@ -1,6 +1,7 @@ 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 @@ -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. -Commit log requirements -======================= -Each commit log should always start with a one-line summary, the second +Commit requirements +=================== +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 entries for all affected files, except the leading TABs which should 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 =============