From: Jeff King <peff@peff.net>
To: Robert Schiele <rschiele@gmail.com>
Cc: Zoltan Klinger <zoltan.klinger@gmail.com>,
GIT Mailing-list <git@vger.kernel.org>
Subject: Re: Unused #include statements
Date: Thu, 15 Jan 2015 01:33:07 -0500 [thread overview]
Message-ID: <20150115063307.GA11028@peff.net> (raw)
In-Reply-To: <CAObFj3wC6ezNQfAYvtepBdW3S0hv8c4_fXYTo-zp4wwddx3QXg@mail.gmail.com>
On Thu, Jan 15, 2015 at 05:14:39AM +0100, Robert Schiele wrote:
> Thus doing those kind of brute-force removals generally makes the
> include structure in a project very fragile. The analysis itself you
> did is still useful to identify header files that can potentially be
> removed but removing them without further analysis I would consider
> problematic.
I would second that. Besides leading to a potentially fragile result,
this analysis was done only for a particular platform with a particular
set of config knobs.
One of our rules is that git-compat-util.h (or one of the well-known
headers which includes, cache.h or builtin.h) is included first in any
translation unit. This gives git-compat-util the cleanest environment
possible for making decisions, and lets macros it defines effect the
rest of the code consistently. I suspect on modern platforms like
Linux/glibc that it is not a huge deal to include git-compat-util a
little late, simply because it does not have all that much to do. But
on Solaris 8? Who knows.
-Peff
next prev parent reply other threads:[~2015-01-15 6:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 3:43 Unused #include statements Zoltan Klinger
2015-01-15 4:14 ` Robert Schiele
2015-01-15 6:33 ` Jeff King [this message]
2015-01-15 18:50 ` Junio C Hamano
2015-01-15 22:38 ` Jeff King
2015-01-15 23:20 ` Junio C Hamano
2015-01-16 0:00 ` Jeff King
2015-01-20 2:08 ` Zoltan Klinger
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=20150115063307.GA11028@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=rschiele@gmail.com \
--cc=zoltan.klinger@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).