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

Re: [PATCH 0/2] Organize mingw includes

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 10, 2025, 13:55 UTC
Message-ID
<c4a03e23-1c14-05b7-25ad-a3d6998df876@gmx.de>
In-Reply-To
<aOjXjEJePkpCDoI3@pks.im>
Hi Patrick,
On Fri, 10 Oct 2025, Patrick Steinhardt wrote:
Show 9 quoted lines
> On Thu, Oct 09, 2025 at 07:45:59AM +0000, Johannes Schindelin via GitGitGadget wrote:
> > Following in the footsteps of the many, many recent #include refactorings,
> > this patch series orders the #include statements in compat/mingw.c.
> 
> Both of these patches look good to me and I like the improved
> consistency that they bring. I may also do the same for our code in
> "refs/", where some of the files use relative includes, as well. Might
> be worth to document this somewhere if it isn't already, but that
> doesn't have to be part of your patch series here.

There's already such a lot of documentation that I fear it is intimidating to any new contributor (and if I was one, I'd be tempted to read it exclusively via AI summaries). I don't want to add to that amount.

> Sorting them also makes sense. It's another thing where I wish that we
> had a tool to enforce this. clang-format supports this in theory, but
> it's disabled right now. And I'm not even sure whether it can be told to
> include e.g. "git-compat-util.h" first.

In theory, I am totally with you: Sorting `#include`s is a job best left to tools. But then, I say the same about formatting, and I see a lot of appetite on this list for preventing that to become a tool-driven job, and instead requiring developer time to be spent on it. Therefore, I don't want to spend any effort trying to get this automated when I see small chances of success in the endeavor of freeing up cognitive cycles for tasks I find more intellectually rewarding than figuring out where a space or a line break goes.

Ciao, Johannes

Previous: Patrick SteinhardtNext: Junio C Hamano
Message 8 of 9 in “Organize mingw includes”
  1. 0/2 Organize mingw includesJohannes Schindelin via GitGitGadget, Oct 9, 2025
  2. 1/2 mingw: avoid relative `#include`sJohannes Schindelin via GitGitGadget, Oct 9, 2025
  3. Matthias AßhauerOct 11, 2025
  4. Johannes SixtOct 12, 2025
  5. Junio C HamanoOct 13, 2025
  6. 2/2 mingw: order `#include`s alphabeticallyJohannes Schindelin via GitGitGadget, Oct 9, 2025
  7. Patrick SteinhardtOct 10, 2025
  8. Johannes SchindelinOct 10, 2025
  9. Junio C HamanoOct 10, 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.