Re: [PATCH 0/9] Add missing includes and forward declares
From: Junio C Hamano <hidden>
Date: 2018-08-15 05:45:26
Elijah Newren [off-list ref] writes:
On Mon, Aug 13, 2018 at 11:24 AM Junio C Hamano [off-list ref] wrote:quoted
Jeff King [off-list ref] writes:quoted
As things are slowly moving out of the so-far kitchen-sink "cache.h" into more specific subsystem headers (like object-store.h), we may actually want to tighten the "header that includes it first" part a bit in the future, so that 'git grep cache.h' would give us a more explicit and a better picture of what really depends on knowing what the lowest level plumbing API are built around.quoted
So I think the better test is a two-line .c file with: #include "git-compat-util.h" #include $header_to_checkBut until that tightening happens, I do not actually mind the two-line .c file started with inclusion of cache.h instead of git-compat-util.h. That would limit the scope of this series further.Yes, this removes about 2/3 of patch #1.
Sorry for making a misleading comment. I should have phrased "I would not have minded if the series were looser by assuming cache.h", implying that "but now the actual patch went extra mile to be more complete, what we have is even better ;-)".