diff options
author | Warner Losh <imp@FreeBSD.org> | 2021-06-17 19:54:12 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2021-06-17 19:54:59 +0000 |
commit | 5851680bcabed1079bbb96c78512fedfa6c2737e (patch) | |
tree | bb22a4f7ffcd7e231c9884f14c751afcebbd08f6 | |
parent | 68d3790ba0bce162f9fcaed09cfecd9adeab3943 (diff) | |
download | src-5851680bcabed1079bbb96c78512fedfa6c2737e.tar.gz src-5851680bcabed1079bbb96c78512fedfa6c2737e.zip |
style(9): Add advice about $FreeBSD$
Codify our standard practice with $FreeBSD$
o New code only needs it if it might land in stable/12
o Old code should retain it until stable/12 is unsupported
o We'll do a bulk remove in the future: don't do it proactively.
o Give advice about how to tag files derived from other files
in the tree.
Reviewed by: bcr, allanjude,ceri
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D30789
-rw-r--r-- | share/man/man9/style.9 | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 77c8dbe8e7d7..fff0e3815c13 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -112,13 +112,20 @@ New lines should only be added when making substantial changes to the file, not for trivial changes. .Pp -After any copyright and license comment, there is a blank line, and the +After any copyright and license comment, there is a blank line. +If your code needs to be merged into stable/12 or earlier, it +needs to have the .Li $\&FreeBSD$ -for non C/C++ language source files. -Version control system ID tags should only exist once in a file -(unlike in this one). +tag. +Otherwise, this tag should be omitted in new code. +Legacy code will have the tag removed in the future. +For non C/C++ language source files, +.Li $\&FreeBSD$ +is next, if applicable. Non-C/C++ source files follow the example above, while C/C++ source files follow the one below. +Version control system ID tags should only exist once in a file +(unlike in this one). All VCS (version control system) revision identification in files obtained from elsewhere should be maintained, including, where applicable, multiple IDs showing a file's history. @@ -132,6 +139,11 @@ and to keep the IDs out of object files. Only add .Dq Li "From: " in front of foreign VCS IDs if the file is renamed. +Add +.Dq Li "From: " +and FreeBSD git hash with full path name if the file was derived +from another FreeBSD file and include relevant copyright info +from the original file. .Bd -literal /* From: @(#)style 1.14 (Berkeley) 4/28/95 */ |