From 1779a0f3b92d58654b43444addeaf437a64d77a8 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 13 Jul 2018 21:21:24 +0200 Subject: serialize a Bug to git as a blob+tree+commit+ref --- repository/repo.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'repository/repo.go') diff --git a/repository/repo.go b/repository/repo.go index 2611324f..3a30128f 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -24,5 +24,17 @@ type Repo interface { PushRefs(remote string, refPattern string) error // StoreData will store arbitrary data and return the corresponding hash - StoreData([]byte) (util.Hash, error) + StoreData(data []byte) (util.Hash, error) + + // StoreTree will store a mapping key-->Hash as a Git tree + StoreTree(mapping map[string]util.Hash) (util.Hash, error) + + // StoreCommit will store a Git commit with the given Git tree + StoreCommit(treeHash util.Hash) (util.Hash, error) + + // StoreCommit will store a Git commit with the given Git tree + StoreCommitWithParent(treeHash util.Hash, parent util.Hash) (util.Hash, error) + + // UpdateRef will create or update a Git reference + UpdateRef(ref string, hash util.Hash) error } -- cgit