Commit graph

4 commits

Author SHA1 Message Date
Martin von Zweigbergk
c4fe7aab10 index: move ReadonlyRepo::load_at_operation() to IndexStore 2021-03-06 09:52:44 -08:00
Martin von Zweigbergk
12bfbc489c index: move ReadonlyIndex::index() to IndexStore 2021-03-06 09:52:38 -08:00
Martin von Zweigbergk
2fdf9721c0 index: move load() to IndexStore 2021-03-06 09:52:27 -08:00
Martin von Zweigbergk
403e86c138 index: introduce IndexStore, which owns ReadonlyIndex files
This patch introduces a new `IndexStore` struct. The idea is that it
will know about the directory in which the index files are stored, the
associations with operations. It may also cache `Arc<ReadonlyIndex>`
instances so if multiple `ReadonlyIndex` instances are loaded, they
can be returned from the cache. That may be useful when merging
operations because the operations are likely to share a large parent
index file. For now, however, all the new type has is `init()`,
`load()`, and `reinit()`.
2021-03-06 09:52:16 -08:00