Skip to content

Commit 12b2306

Browse files
pks-tgitster
authored andcommitted
config: make the config source const
The `struct git_config_source` passed to `config_with_options()` is never modified. Let's mark it as `const` to clarify. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e44b018 commit 12b2306

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ struct config_include_data {
125125
config_fn_t fn;
126126
void *data;
127127
const struct config_options *opts;
128-
struct git_config_source *config_source;
128+
const struct git_config_source *config_source;
129129
struct repository *repo;
130130

131131
/*
@@ -2105,7 +2105,7 @@ static int do_git_config_sequence(const struct config_options *opts,
21052105
}
21062106

21072107
int config_with_options(config_fn_t fn, void *data,
2108-
struct git_config_source *config_source,
2108+
const struct git_config_source *config_source,
21092109
struct repository *repo,
21102110
const struct config_options *opts)
21112111
{

config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void git_config(config_fn_t fn, void *);
232232
* sets `opts.respect_includes` to `1` by default.
233233
*/
234234
int config_with_options(config_fn_t fn, void *,
235-
struct git_config_source *config_source,
235+
const struct git_config_source *config_source,
236236
struct repository *repo,
237237
const struct config_options *opts);
238238

0 commit comments

Comments
 (0)