diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-13 21:21:24 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-13 21:21:24 +0200 |
commit | 1779a0f3b92d58654b43444addeaf437a64d77a8 (patch) | |
tree | 9f973413454894f0456d7379425070d468712242 /repository/repo.go | |
parent | 289f8d53ee960d35c1f0c42e8753ad536737b875 (diff) | |
download | git-bug-1779a0f3b92d58654b43444addeaf437a64d77a8.tar.gz git-bug-1779a0f3b92d58654b43444addeaf437a64d77a8.zip |
serialize a Bug to git as a blob+tree+commit+ref
Diffstat (limited to 'repository/repo.go')
-rw-r--r-- | repository/repo.go | 14 |
1 files changed, 13 insertions, 1 deletions
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 } |