Re: [RFC PATCH 2/2] headers: include dependent headers
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 8, 2014, 17:50 UTC
- Message-ID
- <xmqqfvg2ngrn.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <540B7AA3.1090201@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 21 quoted lines
> Am 06.09.2014 um 21:20 schrieb David Aguilar: >> Add dependent headers so that including a header does not >> require including additional headers. >> >> This makes it so that "gcc -c $header" succeeds for each header. >> >> Signed-off-by: David Aguilar <davvid@gmail.com> >> --- > >> diff --git a/branch.h b/branch.h >> index 64173ab..a61fd1a 100644 >> --- a/branch.h >> +++ b/branch.h >> @@ -3,6 +3,9 @@ >> >> /* Functions for acting on the information about branches. */ >> >> +#include "cache.h" >> +#include "strbuf.h" > > cache.h includes strbuf.h, so the line above isn't necessary.
True, but is "gcc -c $header" something we want to please in the first place (not an objection, but request for opinions)?