From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Michael Haggerty <mhagger@alum.mit.edu>,
Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>,
David Turner <dturner@twopensource.com>,
Lukas Fleischer <lfleischer@lfos.de>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH v7 07/11] refs/refs-internal.h: new header file
Date: Mon, 9 Nov 2015 19:46:43 +0000 [thread overview]
Message-ID: <5640F823.5010902@ramsayjones.plus.com> (raw)
In-Reply-To: <5f62351689318a4ef9feeb3639e6a7a00b354a02.1447085798.git.mhagger@alum.mit.edu>
On 09/11/15 17:03, Michael Haggerty wrote:
> There are a number of constants, structs, and static functions defined
> in refs.c and treated as private to the references module. But we want
> to support multiple reference backends within the reference module,
> and those backends will need access to some heretofore private
> declarations.
>
> We don't want those declarations to be visible to non-refs code, so we
> don't want to move them to refs.h. Instead, add a new header file,
> refs/refs-internal.h, that is intended to be included only from within
> the refs module. Make some functions non-static and move some
> declarations (and their corresponding docstrings) from refs.c to this
> file.
>
> In a moment we will add more content to the "refs" subdirectory.
>
> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
> ---
> refs.c | 175 +++----------------------------------------------
> refs/refs-internal.h | 182 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 191 insertions(+), 166 deletions(-)
> create mode 100644 refs/refs-internal.h
>
> diff --git a/refs.c b/refs.c
> index f48c58a..9aff0c8 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -1,6 +1,6 @@
> #include "cache.h"
> +#include "refs/refs-internal.h"
> #include "lockfile.h"
> -#include "refs.h"
This looked wrong to me, until I had read the remainder of the
patch and noticed that the 'internal' header #included the
'public' interface header.
Unfortunately, this still feels wrong to me! I would rather that
the internal header _not_ include the public header (so, include
them _both_ when necessary). Just my opinion, which you can simply
ignore. :-D
ATB,
Ramsay Jones
next prev parent reply other threads:[~2015-11-09 19:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 17:03 [PATCH v7 00/11] refs backend pre-vtable Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 01/11] refs: make is_branch public Michael Haggerty
2015-11-09 18:54 ` Ramsay Jones
2015-11-09 21:22 ` David Turner
2015-11-10 7:37 ` Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 02/11] verify_refname_available(): rename function Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 03/11] verify_refname_available(): new function Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 04/11] copy_msg(): rename to copy_reflog_msg() Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 05/11] pack_if_possible_fn(): use ref_type() instead of is_per_worktree_ref() Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 06/11] refname_is_safe(): improve docstring Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 07/11] refs/refs-internal.h: new header file Michael Haggerty
2015-11-09 19:46 ` Ramsay Jones [this message]
2015-11-09 21:23 ` David Turner
2015-11-10 7:40 ` Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 09/11] initdb: make safe_create_dir public Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 10/11] files_log_ref_write: new function Michael Haggerty
2015-11-09 17:03 ` [PATCH v7 11/11] refs: break out ref conflict checks Michael Haggerty
2015-11-09 21:28 ` [PATCH v7 00/11] refs backend pre-vtable David Turner
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=5640F823.5010902@ramsayjones.plus.com \
--to=ramsay@ramsayjones.plus.com \
--cc=dturner@twopensource.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=lfleischer@lfos.de \
--cc=mhagger@alum.mit.edu \
--cc=peff@peff.net \
--cc=ronniesahlberg@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 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.