git: 7510633e76cf - main - style(9): Default to omitting $FreeBSD$
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 04 Feb 2022 22:39:21 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7510633e76cf66ceea6a4b27d0892535f73e3ad5 commit 7510633e76cf66ceea6a4b27d0892535f73e3ad5 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-02-04 22:38:15 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-02-04 22:38:15 +0000 style(9): Default to omitting $FreeBSD$ Advise people to omit $FreeBSD$ (in both comments and macros) unless the code is definitely going to be merged to stable/12. This strengthens previous statements and is appropriate now that stable/11 is no longer supported. If people are wrong and things are unexpected merged to 12, tags can be added before that merge. No sense adding a tag that will never be expanded and removed later on the off chance it might wind up in stable/12. The next step is likely to weaken this to apply just to mergemaster managed files, but not today. Reviewed by: rpokala, cem, erj, hselasky, brooks, kib Differential Revision: https://reviews.freebsd.org/D34152 --- share/man/man9/style.9 | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index beeb8d4568d2..2c080158567d 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -25,7 +25,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd October 28, 2020 +.Dd February 2, 2022 .Dt STYLE 9 .Os .Sh NAME @@ -49,7 +49,6 @@ is silent on an issue. * Style guide for FreeBSD. Based on the CSRG's KNF (Kernel Normal Form). * * @(#)style 1.14 (Berkeley) 4/28/95 - * $FreeBSD$ */ /* @@ -113,15 +112,12 @@ 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. -If your code needs to be merged into stable/12 or earlier, it -needs to have the +Include .Li $\&FreeBSD$ -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. +or +.Li __FBSDID("$\&FreeBSD$"); +only if you are certain the new code will be merged to stable/12. +The tag will be removed from legacy code in the future. 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 @@ -146,9 +142,6 @@ from another FreeBSD file and include relevant copyright info from the original file. .Bd -literal /* From: @(#)style 1.14 (Berkeley) 4/28/95 */ - -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); .Ed .Pp Leave one blank line before the header files.