Re: [PATCH] documentation: add tutorial for revision walking
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 10, 2019, 21:26 UTC
- Message-ID
- <xmqq36khm8rj.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CAPig+cTZFL=GzM_-S2JMWWxRU7poJ87f3a9ZcFjjUe1T131eEQ@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 14 quoted lines
>> +/* >> + * "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.