From: Junio C Hamano Date: Fri, 10 Oct 2025 16:18:32 GMT Subject: Re: [PATCH 0/2] Organize mingw includes Message-ID: In-Reply-To: Johannes Schindelin writes: >> 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, I am afraid that it is apples-to-oranges comparison. Nobody has to read the #include directives; they may have to see if a header they care about (because they are planning to add a call to a function that hasn't been used in the particular C source file, perhaps) is already included, and sorted list of includes is a good tool to help them. IOW, they do not read them, they scan in them. But the code, the result of formatting, must be readable by people.