Thread (103 messages) flat view 103 messages, 6 authors, 2018-02-28

Re: [PATCH 00/26] Moving global state into the repository object (part 1)

From: Duy Nguyen <hidden>
Date: 2018-02-13 12:13:52

On Tue, Feb 13, 2018 at 6:49 PM, Duy Nguyen [off-list ref] wrote:
On Mon, Feb 12, 2018 at 05:22:15PM -0800, Stefan Beller wrote:
quoted
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.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help