aboutsummaryrefslogtreecommitdiffstats
path: root/repository/repo.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-13 21:21:24 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-13 21:21:24 +0200
commit1779a0f3b92d58654b43444addeaf437a64d77a8 (patch)
tree9f973413454894f0456d7379425070d468712242 /repository/repo.go
parent289f8d53ee960d35c1f0c42e8753ad536737b875 (diff)
downloadgit-bug-1779a0f3b92d58654b43444addeaf437a64d77a8.tar.gz
serialize a Bug to git as a blob+tree+commit+ref
Diffstat (limited to 'repository/repo.go')
-rw-r--r--repository/repo.go14
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
}