Skip to content

Commit 59b12ae

Browse files
ramsay-jonesgitster
authored andcommitted
config.h: fix hdr-check warnings
commit 8f7c7f5 ("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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6f11fd5 commit 59b12ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "string-list.h"
66

77
struct object_id;
8+
struct repository;
89

910
/* git_config_parse_key() returns these negated: */
1011
#define CONFIG_INVALID_KEY 1
@@ -215,7 +216,6 @@ extern int git_configset_get_maybe_bool(struct config_set *cs, const char *key,
215216
extern int git_configset_get_pathname(struct config_set *cs, const char *key, const char **dest);
216217

217218
/* Functions for reading a repository's config */
218-
struct repository;
219219
extern void repo_config(struct repository *repo, config_fn_t fn, void *data);
220220
extern int repo_config_get_value(struct repository *repo,
221221
const char *key, const char **value);

0 commit comments

Comments
 (0)