From d6fcf4c7b284b12b9cd50610b9bfa25ad51990d8 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sat, 31 Dec 2022 00:01:34 -0800 Subject: [PATCH] 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). --- lib/src/repo.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/repo.rs b/lib/src/repo.rs index b5ea6c444..1ab90e058 100644 --- a/lib/src/repo.rs +++ b/lib/src/repo.rs @@ -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(),