From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 05/16] revision: add missing include
Date: Thu, 31 Oct 2013 11:11:07 -0700 [thread overview]
Message-ID: <xmqqppql71l0.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: 1383211547-9145-6-git-send-email-felipe.contreras@gmail.com
Felipe Contreras <felipe.contreras@gmail.com> writes:
> Otherwise we might not have 'struct diff_options'.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
> revision.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/revision.h b/revision.h
> index e7f1d21..89132df 100644
> --- a/revision.h
> +++ b/revision.h
> @@ -5,6 +5,7 @@
> #include "grep.h"
> #include "notes.h"
> #include "commit.h"
> +#include "diff.h"
>
> #define SEEN (1u<<0)
> #define UNINTERESTING (1u<<1)
This is a step in the right direction to change the contract between
this header file and its consumers, but I think it falls short of
doing a good job at it.
The rule used to be that "if you use a declaration in revision.h,
you must include diff.h before including it, even if you do not use
any declaration made in diff.h yourself".
The new rule this patch introduces is "if you use a declaration in
foo.h, include foo.h, period---foo.h should handle its requirement
on its own internally and consumers should not have to care", which
is much saner.
But the patch needs to also remove '#include "diff.h"' from existing
consumers that themselves do not use any declaration from "diff.h"
(e.g. bundle.c; there are others), while keeping the inclusion in
those that do (e.g. builtin/commit.c). That can be a separate patch
that immediately follow this one, or a part of the same patch.
Thanks.
next prev parent reply other threads:[~2013-10-31 18:11 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 9:25 [PATCH 00/16] Trivial patches Felipe Contreras
2013-10-31 9:25 ` [PATCH 01/16] merge: simplify ff-only option Felipe Contreras
2013-10-31 18:04 ` Junio C Hamano
2013-10-31 9:25 ` [PATCH 02/16] t: replace pulls with merges Felipe Contreras
2013-10-31 9:25 ` [PATCH 03/16] pull: cleanup documentation Felipe Contreras
2013-10-31 18:11 ` Junio C Hamano
2013-10-31 18:37 ` Felipe Contreras
2013-10-31 19:00 ` Junio C Hamano
2013-10-31 19:27 ` Max Horn
2013-10-31 19:42 ` Junio C Hamano
2013-10-31 20:43 ` Junio C Hamano
2013-10-31 21:16 ` Felipe Contreras
2013-10-31 23:40 ` David Aguilar
2013-11-01 1:56 ` Felipe Contreras
2013-11-01 2:48 ` David Aguilar
2013-11-01 3:50 ` Felipe Contreras
2013-11-01 11:05 ` SZEDER Gábor
2013-11-01 12:20 ` Felipe Contreras
2013-10-31 19:51 ` Felipe Contreras
2013-10-31 20:27 ` Junio C Hamano
2013-10-31 21:15 ` Felipe Contreras
2013-10-31 9:25 ` [PATCH 04/16] fetch: add missing documentation Felipe Contreras
2013-10-31 18:10 ` Junio C Hamano
2013-10-31 19:08 ` Felipe Contreras
2013-10-31 9:25 ` [PATCH 05/16] revision: add missing include Felipe Contreras
2013-10-31 18:11 ` Junio C Hamano [this message]
2013-10-31 9:25 ` [PATCH 06/16] shortlog: add missing declaration Felipe Contreras
2013-10-31 19:05 ` Junio C Hamano
2013-10-31 19:33 ` Felipe Contreras
2013-10-31 20:07 ` Junio C Hamano
2013-10-31 21:17 ` Felipe Contreras
2013-10-31 9:25 ` [PATCH 07/16] branch: trivial style fix Felipe Contreras
2013-10-31 20:46 ` Junio C Hamano
2013-10-31 9:25 ` [PATCH 08/16] sha1-name: trivial style cleanup Felipe Contreras
2013-10-31 9:25 ` [PATCH 09/16] transport-helper: trivial style fix Felipe Contreras
2013-10-31 9:25 ` [PATCH 10/16] describe: trivial style fixes Felipe Contreras
2013-10-31 9:25 ` [PATCH 11/16] pretty: trivial style fix Felipe Contreras
2013-10-31 9:25 ` [PATCH 12/16] revision: trivial style fixes Felipe Contreras
2013-10-31 9:25 ` [PATCH 13/16] diff: trivial style fix Felipe Contreras
2013-10-31 9:25 ` [PATCH 14/16] run-command: trivial style fixes Felipe Contreras
2013-10-31 9:25 ` [PATCH 15/16] setup: " Felipe Contreras
2013-10-31 20:48 ` Junio C Hamano
2013-10-31 9:25 ` [PATCH 16/16] add: avoid yoda conditions Felipe Contreras
2013-10-31 19:48 ` Martin von Zweigbergk
2013-10-31 19:56 ` Felipe Contreras
2013-10-31 20:31 ` Junio C Hamano
2013-10-31 20:42 ` Felipe Contreras
2013-10-31 18:03 ` [PATCH 00/16] Trivial patches Max Horn
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=xmqqppql71l0.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.