ok/jj
1
0
Fork 0
forked from mirrors/jj

repo: load correct OpHeadsStore depending on repo's type

We forgot to actually call `StoreFactories::load_op_heads_store()` to
load the right type of `OpHeadsStore` depending on the contents of
`.jj/repo/op_heads/type`. That shouldn't have any effect yet since we
only have one type so far, and there are no out-of-tree types yet
either (clearly, since they would not work).
This commit is contained in:
Martin von Zweigbergk 2022-12-31 00:01:34 -08:00 committed by Martin von Zweigbergk
parent cf8c2b0717
commit d6fcf4c7b2

View file

@ -463,7 +463,8 @@ impl RepoLoader {
let store = Store::new(store_factories.load_backend(&repo_path.join("store")));
let repo_settings = user_settings.with_repo(repo_path).unwrap();
let op_store = Arc::from(store_factories.load_op_store(&repo_path.join("op_store")));
let op_heads_store = Arc::new(SimpleOpHeadsStore::load(&repo_path.join("op_heads")));
let op_heads_store =
Arc::from(store_factories.load_op_heads_store(&repo_path.join("op_heads")));
let index_store = Arc::new(IndexStore::load(repo_path.join("index")));
Self {
repo_path: repo_path.to_path_buf(),