git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] config.h: fix hdr-check warnings
@ 2019-01-13 21:02 Ramsay Jones
  2019-01-14  9:59 ` Duy Nguyen
  0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2019-01-13 21:02 UTC (permalink / raw)
  To: Nguyen Thai Ngoc Duy; +Cc: Junio C Hamano, GIT Mailing-list


commit 8f7c7f5555 ("config.c: add repo_config_set_worktree_gently()",
2018-12-27) adds three function declarations that cause the hdr-check
make target to complain. The hdr-check complaint is caused by placing
the new declarations, which include 'struct repository *' parameters,
before the declaration of 'struct repository'. Move the struct
declaration to the top of the file.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Duy,

If you need to re-roll your 'nd/config-move-to' branch, could you please
squash this into the relevant patch (commit 8f7c7f5555).

BTW, none of the three new functions are called outside of config.c on
the 'pu' branch - I assume future patches will add some calls to these
functions (yes?).

Thanks!

ATB,
Ramsay Jones

 config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config.h b/config.h
index 62204dc252..77c5b12873 100644
--- a/config.h
+++ b/config.h
@@ -5,6 +5,7 @@
 #include "string-list.h"
 
 struct object_id;
+struct repository;
 
 /* git_config_parse_key() returns these negated: */
 #define CONFIG_INVALID_KEY 1
@@ -215,7 +216,6 @@ extern int git_configset_get_maybe_bool(struct config_set *cs, const char *key,
 extern int git_configset_get_pathname(struct config_set *cs, const char *key, const char **dest);
 
 /* Functions for reading a repository's config */
-struct repository;
 extern void repo_config(struct repository *repo, config_fn_t fn, void *data);
 extern int repo_config_get_value(struct repository *repo,
 				 const char *key, const char **value);
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] config.h: fix hdr-check warnings
  2019-01-13 21:02 [PATCH] config.h: fix hdr-check warnings Ramsay Jones
@ 2019-01-14  9:59 ` Duy Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Duy Nguyen @ 2019-01-14  9:59 UTC (permalink / raw)
  To: Ramsay Jones, Junio C Hamano; +Cc: GIT Mailing-list

On Mon, Jan 14, 2019 at 4:02 AM Ramsay Jones
<ramsay@ramsayjones.plus.com> wrote:
>
>
> commit 8f7c7f5555 ("config.c: add repo_config_set_worktree_gently()",
> 2018-12-27) adds three function declarations that cause the hdr-check
> make target to complain. The hdr-check complaint is caused by placing
> the new declarations, which include 'struct repository *' parameters,
> before the declaration of 'struct repository'. Move the struct
> declaration to the top of the file.
>
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Duy,
>
> If you need to re-roll your 'nd/config-move-to' branch, could you please
> squash this into the relevant patch (commit 8f7c7f5555).

Hi Junio, I notice you squashed in all changes of this series (I was
preparing to resend last weekend). Will you squash this in too? It's
of course ok if you don't, I'll resend.

> BTW, none of the three new functions are called outside of config.c on
> the 'pu' branch - I assume future patches will add some calls to these
> functions (yes?).

Yes. Once this part lands I'll submit the fun stuff.
-- 
Duy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-14  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-13 21:02 [PATCH] config.h: fix hdr-check warnings Ramsay Jones
2019-01-14  9:59 ` Duy Nguyen

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).