Re: [PATCH] documentation: add tutorial for revision walking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

>> +/*
>> + * "git walken"
>> + *
>> + * Part of the "My First Revision Walk" tutorial.
>> + */
>> +
>> +#include <stdio.h>
>> +#include "builtin.h"
>
> Git source files must always include cache.h or git-compat-util.h (or,
> for builtins, builtin.h) as the very first header since those headers
> take care of differences which might crop up as problems with system
> headers on various platforms. System headers are included after Git
> headers. So, stdio.h should be included after builtin.h. In this case,

Actually the idea is that platform agnostic part of the codebase
should not have to include _any_ system header themselves; instead,
including git-compat-util.h should take care of the system header
files *including* the funky ordering requirements some platforms may
have.  So, we'd want to go stronger than "should be included after";
it shouldn't have to be included or our git-compat-util.h is wrong.

I've started reading the patch myself, but it seems that you've
already done a lot more thorough read-thru than I would have done,
so thank you very much for that.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux