On Wed, Apr 01, 2009 at 10:25:09PM -0700, Junio C Hamano wrote: > > - a header file should be included in a C file only if it is needed to > > compile the C file (it is not ok to include it only because it includes > > many other headers that are needed) > > If that is the rule, perhaps the problem lies not in a .c program that > includes such a .h header, but in the .h itself that includes many other > header files. If this were combined with splitting gigantic .h files (like cache.h) into smaller logical units, then we could in theory speed up recompilation times with make (we would also need to correctly track header dependencies, but gcc -M can do this fairly easily). But it does come at the price of actually having to consider which include files are necessary. I can't think of more than half a dozen times in the last year I have actually had to add a #include while working on a git .c file, mostly because everything and the kitchen sink is included by cache.h. So I don't know if it is worth it. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html