{"thread":{"id":"50216","subject":"[PATCH] config.h: fix hdr-check warnings","startedAt":"2019-01-13T21:02:23Z","lastAt":"2019-01-14T09:59:48Z","messageCount":2,"participants":["Ramsay Jones","Duy Nguyen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"366638","messageId":"13179d3e-f1d5-55f7-3572-829b5ddc9827@ramsayjones.plus.com","threadId":"50216","inReplyTo":null,"subject":"[PATCH] config.h: fix hdr-check warnings","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2019-01-13T21:02:18Z","receivedAt":"2019-01-13T21:02:23Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\ncommit 8f7c7f5555 (\"config.c: add repo_config_set_worktree_gently()\",\n2018-12-27) adds three function declarations that cause the hdr-check\nmake target to complain. The hdr-check complaint is caused by placing\nthe new declarations, which include 'struct repository *' parameters,\nbefore the declaration of 'struct repository'. Move the struct\ndeclaration to the top of the file.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Duy,\n\nIf you need to re-roll your 'nd/config-move-to' branch, could you please\nsquash this into the relevant patch (commit 8f7c7f5555).\n\nBTW, none of the three new functions are called outside of config.c on\nthe 'pu' branch - I assume future patches will add some calls to these\nfunctions (yes?).\n\nThanks!\n\nATB,\nRamsay Jones\n\n config.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/config.h b/config.h\nindex 62204dc252..77c5b12873 100644\n--- a/config.h\n+++ b/config.h\n@@ -5,6 +5,7 @@\n #include \"string-list.h\"\n \n struct object_id;\n+struct repository;\n \n /* git_config_parse_key() returns these negated: */\n #define CONFIG_INVALID_KEY 1\n@@ -215,7 +216,6 @@ extern int git_configset_get_maybe_bool(struct config_set *cs, const char *key,\n extern int git_configset_get_pathname(struct config_set *cs, const char *key, const char **dest);\n \n /* Functions for reading a repository's config */\n-struct repository;\n extern void repo_config(struct repository *repo, config_fn_t fn, void *data);\n extern int repo_config_get_value(struct repository *repo,\n \t\t\t\t const char *key, const char **value);\n-- \n2.20.0\n"},{"id":"366644","messageId":"CACsJy8DceS3J_kmA9p66J1ecYTZ3=-ky5mT-NwMT7uKkVtUmdA@mail.gmail.com","threadId":"50216","inReplyTo":"13179d3e-f1d5-55f7-3572-829b5ddc9827@ramsayjones.plus.com","subject":"Re: [PATCH] config.h: fix hdr-check warnings","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2019-01-14T09:59:20Z","receivedAt":"2019-01-14T09:59:48Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Jan 14, 2019 at 4:02 AM Ramsay Jones\n<ramsay@ramsayjones.plus.com> wrote:\n>\n>\n> commit 8f7c7f5555 (\"config.c: add repo_config_set_worktree_gently()\",\n> 2018-12-27) adds three function declarations that cause the hdr-check\n> make target to complain. The hdr-check complaint is caused by placing\n> the new declarations, which include 'struct repository *' parameters,\n> before the declaration of 'struct repository'. Move the struct\n> declaration to the top of the file.\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n> ---\n>\n> Hi Duy,\n>\n> If you need to re-roll your 'nd/config-move-to' branch, could you please\n> squash this into the relevant patch (commit 8f7c7f5555).\n\nHi Junio, I notice you squashed in all changes of this series (I was\npreparing to resend last weekend). Will you squash this in too? It's\nof course ok if you don't, I'll resend.\n\n> BTW, none of the three new functions are called outside of config.c on\n> the 'pu' branch - I assume future patches will add some calls to these\n> functions (yes?).\n\nYes. Once this part lands I'll submit the fun stuff.\n-- \nDuy\n"}]}