git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] CodingGuildlines: allow the use of bool

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 14, 2025, 16:37 UTC
Message-ID
<xmqqv7nuu3sj.fsf@gitster.g>
In-Reply-To
<352f80c49b74053d611e7d64991fed1c16d857a4.1752499610.git.phillip.wood@dunelm.org.uk>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 22 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> We have had a test balloon for C99's bool type since 8277dbe987
> (git-compat-util: convert skip_{prefix,suffix}{,_mem} to bool,
> 2023-12-16). As we've had it over 18 months without any complaints
> let's declare it a success.
>
> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
> ---
>  Documentation/CodingGuidelines | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
> index 6350949f2ef..528b42d1dd1 100644
> --- a/Documentation/CodingGuidelines
> +++ b/Documentation/CodingGuidelines
> @@ -298,6 +298,9 @@ For C programs:
>     . since late 2021 with 44ba10d6, we have had variables declared in
>       the for loop "for (int i = 0; i < 10; i++)".
>  
> +   . since late 2023 with 8277dbe987 we have been using the bool type
> +     from <stdbool.h>.
Let's see the other ones in the same list.
 * initializer elements that are not static (used since 2b6854c8
   (Cleanup variables in cat-file, 2007-04-21), declared official
   with 442c27dd (CodingGuidelines: mention dynamic C99 initializer
   elements, 2022-10-10).
 * trailing comma in enum definition (used since e1327023 (grep:
   refactor the concept of "grep source" into an object,
   2012-02-02), declared official with cc0c4297 (CodingGuidelines:
   spell out post-C89 rules, 2019-07-16).
 * designated initialiers for struct and arrays (used since cbc0f81d
   (strbuf: use designated initializers in STRBUF_INIT, 2017-07-10)
   and 512f41cf (clean.c: use designated initializer, 2017-07-14),
   declared official with cc0c4297 (CodingGuidelines: spell out
   post-C89 rules, 2019-07-16).
 * variadic macros (used since 765dc168 (git-compat-util: always
   enable variadic macros, 2021-01-28), declared official with
   56a29d2c (C99: remove hardcoded-out !HAVE_VARIADIC_MACROS code,
   2022-02-21).
 * declaring a control variable in for(;;) loop (used since 44ba10d6
   (revision: use C99 declaration of variable in for() loop,
   2021-11-14), declared official with 82dd01d8 (CodingGuidelines:
   allow declaring variables in for loops, 2022-10-10).
A year and a half sounds roughly the average timespan.
Will queue.  Thanks.
Previous: Phillip WoodNext: Phillip Wood
Message 3 of 33 in “C99: declare bool experiment a success”
  1. 0/3 C99: declare bool experiment a successPhillip Wood, Jul 14, 2025
  2. 1/3 CodingGuildlines: allow the use of boolPhillip Wood, Jul 14, 2025
  3. Junio C HamanoJul 14, 2025
  4. 2/3 git-compat-util: convert string predicates to return boolPhillip Wood, Jul 14, 2025
  5. Eric SunshineJul 14, 2025
  6. Elijah NewrenJul 14, 2025
  7. brian m. carlsonJul 14, 2025
  8. Phillip WoodJul 15, 2025
  9. 3/3 strbuf: convert predicates to return boolPhillip Wood, Jul 14, 2025
  10. 0/3 C99: declare bool experiment a successPhillip Wood, Jul 15, 2025
  11. 1/3 CodingGuildlines: allow the use of boolPhillip Wood, Jul 15, 2025
  12. Jeff KingJul 16, 2025
  13. Jeff KingJul 16, 2025
  14. Elijah NewrenJul 16, 2025
  15. 2/3 git-compat-util: convert string predicates to return boolPhillip Wood, Jul 15, 2025
  16. 3/3 strbuf: convert predicates to return boolPhillip Wood, Jul 15, 2025
  17. Elijah NewrenJul 15, 2025
  18. rsbecker@nexbridge.comJul 15, 2025
  19. Elijah NewrenJul 15, 2025
  20. rsbecker@nexbridge.comJul 15, 2025
  21. Junio C HamanoJul 15, 2025
  22. Junio C HamanoJul 15, 2025
  23. brian m. carlsonJul 15, 2025
  24. Junio C HamanoJul 15, 2025
  25. 0/3 C99: declare bool experiment a successPhillip Wood, Jul 16, 2025
  26. 1/3 CodingGuidelines: allow the use of boolPhillip Wood, Jul 16, 2025
  27. 2/3 git-compat-util: convert string predicates to return boolPhillip Wood, Jul 16, 2025
  28. Karthik NayakJul 16, 2025
  29. 3/3 strbuf: convert predicates to return boolPhillip Wood, Jul 16, 2025
  30. Karthik NayakJul 16, 2025
  31. Karthik NayakJul 16, 2025
  32. Phillip WoodJul 17, 2025
  33. Karthik NayakJul 22, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.