Files
git/Documentation
Junio C Hamano 412cb2ec13 CodingGuidelines: clarify C #include rules
Even though "advice.h" includes "git-compat-util.h", it is not
sensible to have it as the first #include and indirectly satisify
the "You must give git-compat-util.h a clean environment to set up
feature test macros before including any of the system headers are
included", which is the real requirement.

Because:

 - A command that interacts with the object store, config subsystem,
   the index, or the working tree cannot do anything without using
   what is declared in "cache.h";

 - A built-in command must be declared in "builtin.h", so anything
   in builtin/*.c must include it;

 - These two headers both include "git-compat-util.h" as the first
   thing; and

 - Almost all our *.c files (outside compat/ and borrowed files in
   xdiff/) need some Git-ness from "cache.h" to do something
   Git-ish.

let's explicitly specify that one of these three header files must
be the first thing that is included.

Any of our *.c file should include the header file that directly
declares what it uses, instead of relying on the fact that some *.h
file it includes happens to include another *.h file that declares
the necessary function or type.  Spell it out as another guideline
item.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-15 15:42:50 -08:00
..
2014-03-31 15:16:22 -07:00
2014-04-25 10:03:41 -07:00
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2013-07-22 16:06:48 -07:00
2013-02-14 10:29:01 -08:00
2013-09-04 12:23:25 -07:00
2013-09-09 14:50:36 -07:00
2013-12-17 11:46:32 -08:00
2013-10-23 13:21:31 -07:00
2014-04-08 12:00:28 -07:00
2011-09-06 11:42:12 -07:00
2013-05-29 14:23:04 -07:00
2013-10-18 13:50:12 -07:00
2011-03-11 10:59:16 -05:00
2014-02-27 14:04:05 -08:00
2013-04-12 12:00:52 -07:00
2014-04-09 12:06:14 -07:00
2014-02-07 11:55:12 -08:00