Re: [PATCH 08/20] config: introduce missing setters that take repo as parameter
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Aug 13, 2024, 09:25 UTC
- Message-ID
- <ZrsmlVfjIoFw3gur@tanuki>
- In-Reply-To
- <rg5j5ehur5a2qvpt65ezfub5dmmqrbn7if5f2r7ibweuupsnm2@qeciml3qvdvy>
On Fri, Aug 09, 2024 at 03:07:37PM -0500, Justin Tobler wrote:
Show 15 quoted lines
> On 24/08/07 08:57AM, Patrick Steinhardt wrote: > > diff --git a/config.c b/config.c > > index 6421894614..ac89b708e7 100644 > > --- a/config.c > > +++ b/config.c > > @@ -3178,21 +3178,39 @@ static void maybe_remove_section(struct config_store_data *store, > > *end_offset = store->parsed[store->parsed_nr - 1].end; > > } > > > > +int repo_config_set_in_file_gently(struct repository *r, const char *config_filename, > > + const char *key, const char *comment, const char *value) > > Instead of prefixing with `repo_`, should we instead use the `config_` > prefix? Maybe `config_repo_`? It might be nice for names to align with > the config subsystem here.
I think I agree, but we extensively use the `repo_config_` prefix for all functions that take a repository as input in this subsystem. So in this case I think we should stick with that, but we may eventually want to revisit this.
Patrick