From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Dmitry Ivankov <divanorama@gmail.com>,
git@vger.kernel.org, David Barr <davidbarr@google.com>,
Stephen Boyd <bebarino@gmail.com>
Subject: Re: [PATCH v3 2/2] Reduce parse-options.o dependencies
Date: Thu, 11 Aug 2011 16:35:02 -0700 [thread overview]
Message-ID: <7vr54ro72x.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 20110811110441.GD5012@elie.gateway.2wire.net
Jonathan Nieder <jrnieder@gmail.com> writes:
>> diff --git a/parse-options-cb.c b/parse-options-cb.c
>> new file mode 100644
>> index 0000000..c248f66
>> --- /dev/null
>> +++ b/parse-options-cb.c
>> @@ -0,0 +1,125 @@
>> +#include "git-compat-util.h"
>> +#include "parse-options.h"
>> +#include "cache.h"
>
> Style: Files in git tend to use only one of "git-compat-util.h",
> "cache.h", or "builtin.h" and put it at the top. So in this case, it
> should probably use just "cache.h".
This needs a bit of clarification.
The compatibility rule actually is to have git-compat-util.h at the very
beginning. As cache.h is a very widely used header almost everybody that
needs to access the internals include, it includes git-compat-util.h as
its first thing to include.
So if this is an old file that existed before git-compat-util.h, then it
is perfectly fine to start it with
#include "cache.h"
#include "parse-options.h"
Otherwise the three-line include above is also just fine.
prev parent reply other threads:[~2011-08-11 23:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 9:15 [PATCH v3 0/2] Reduce parse-options.o dependencies Dmitry Ivankov
2011-08-11 9:15 ` [PATCH v3 1/2] parse-options: export opterr, optbug Dmitry Ivankov
2011-08-11 10:42 ` Jonathan Nieder
2011-08-11 9:15 ` [PATCH v3 2/2] Reduce parse-options.o dependencies Dmitry Ivankov
2011-08-11 11:04 ` Jonathan Nieder
2011-08-11 23:35 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr54ro72x.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=bebarino@gmail.com \
--cc=davidbarr@google.com \
--cc=divanorama@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).