On 02/13, Duy Nguyen wrote: > On Tue, Feb 13, 2018 at 6:49 PM, Duy Nguyen <pclouds@xxxxxxxxx> wrote: > > On Mon, Feb 12, 2018 at 05:22:15PM -0800, Stefan Beller wrote: > >> This is a real take on the first part of the recent RFC[1]. > >> > >> ... > >> > >> Duy suggested that we shall not use the repository blindly, but > >> should carefully examine whether to pass on an object store or the > >> refstore or such[4], which I agree with if it makes sense. This > >> series unfortunately has an issue with that as I would not want to > >> pass down the `ignore_env` flag separately from the object store, so > >> I made all functions that only take the object store to have the raw > >> object store as the first parameter, and others using the full > >> repository. > > > > Second proposal :) How about you store ignore_env in raw_object_store? > > This would not be the first time an object has some configuration > > passed in at construction time. And it has a "constructor" now, > > raw_object_store_init() (I probably should merge _setup in it too) > > A bit more on this configuration parameters. Down the road I think we > need something like this anyway to delete global config vars like > packed_git_window_size, delta_base_cache_limit... Either all these > end up in raw_object_store, or raw_object_store holds a link to > "struct config_set". > > The ignore_env specifically though looks to me like a stop gap > solution until everything goes through repo_init() first. At that > point we don't have to delay getenv() anymore. We can getenv() all at > repo_init() then pass them in raw_object_store and ignore_env should > be gone. So sticking it inside raw_object_store _temporarily_ does not > sound so bad. I like this approach, I mean at the moment we are replicating a single bit of data but that allows us to be able to limit the scope of where a repository struct is passed, giving us a better abstraction layer. > -- > Duy -- Brandon Williams