objectstore: snapshot takes Object not path

Refactor the `ObjectStore.snapshot` method to take an `Object` not
a plain filesystem tree, so the latter is more encapsulated from
the ObjectStore user (e.g. the pipeline) and prepares a unified
code-path for `snapshot` and `commit` in the future.
This commit is contained in:
Christian Kellner 2020-02-17 19:28:55 +01:00 committed by Tom Gundersen
parent 5deb1be514
commit 25b3807a5b
3 changed files with 10 additions and 10 deletions

View file

@ -72,7 +72,7 @@ class TestObjectStore(unittest.TestCase):
with object_store.new("b") as tree:
p = Path(f"{tree.path}/A")
p.touch()
object_store.snapshot(tree.path, "a")
object_store.snapshot(tree, "a")
p = Path(f"{tree.path}/B")
p.touch()