From: Kristofer Karlsson Date: Tue, 13 Oct 2026 07:41:24 GMT Subject: Re: [PATCH v3 3/4] connected: add transfer.connectivityCheck config and rev-list flag Message-ID: In-Reply-To: On Mon, 12 Oct 2026 at 20:49, Junio C Hamano wrote: > > > +static int incremental_check_applicable(struct check_connected_options *opt) > > +{ > > + const char *algorithm = NULL; > > + > > + if (repo_config_get_string_tmp(the_repository, > > + "transfer.connectivitycheck", > > + &algorithm)) > > + return 0; > > The file does declare USE_THE_REPOSITORY_VARIABLE but I wonder if we > can easily reduce the dependency to the_repository by adding "struct > repository *repo" pointer to the check_connected_options structure > and using it here and passing it to check_connected_promisor() which > is a file-scope static nearby. Yes, I could add the repo pointer to the structure if needed. I initally just considered adding it as a function parameter (which would not be a large benefit, except pushing out the repository usage to the outer layers at least) but adding it to the struct would perhaps be cleaner. I could also add a slightly larger patch to fix the entire file and remove USE_THE_REPOSITORY_VARIABLE. I don't think it would be overly messy. I will play around a bit with both these ideas and see where it ends up for the next reroll. Thanks, Kristofer