aboutsummaryrefslogtreecommitdiffstats
path: root/repository/repo.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-06-27 22:00:15 +0200
committerMichael Muré <batolettre@gmail.com>2020-06-27 22:00:15 +0200
commit939bcd57b9446b9dce78d7a8c3b15fa13e6320f7 (patch)
treeb6f73782f2f400a89fe0a777502a98fe505a080b /repository/repo.go
parent1e3dd82fd619f7b43b3193016232ef69f9707f42 (diff)
downloadgit-bug-939bcd57b9446b9dce78d7a8c3b15fa13e6320f7.tar.gz
repo: more tests
Diffstat (limited to 'repository/repo.go')
-rw-r--r--repository/repo.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/repository/repo.go b/repository/repo.go
index 561fc1c5..13bcca4f 100644
--- a/repository/repo.go
+++ b/repository/repo.go
@@ -66,12 +66,21 @@ type Repo interface {
// StoreTree will store a mapping key-->Hash as a Git tree
StoreTree(mapping []TreeEntry) (git.Hash, error)
+ // ReadTree will return the list of entries in a Git tree
+ ReadTree(hash git.Hash) ([]TreeEntry, error)
+
// StoreCommit will store a Git commit with the given Git tree
StoreCommit(treeHash git.Hash) (git.Hash, error)
// StoreCommit will store a Git commit with the given Git tree
StoreCommitWithParent(treeHash git.Hash, parent git.Hash) (git.Hash, error)
+ // GetTreeHash return the git tree hash referenced in a commit
+ GetTreeHash(commit git.Hash) (git.Hash, error)
+
+ // FindCommonAncestor will return the last common ancestor of two chain of commit
+ FindCommonAncestor(hash1 git.Hash, hash2 git.Hash) (git.Hash, error)
+
// UpdateRef will create or update a Git reference
UpdateRef(ref string, hash git.Hash) error
@@ -86,15 +95,6 @@ type Repo interface {
// ListCommits will return the list of tree hashes of a ref, in chronological order
ListCommits(ref string) ([]git.Hash, error)
-
- // ListEntries will return the list of entries in a Git tree
- ListEntries(hash git.Hash) ([]TreeEntry, error)
-
- // FindCommonAncestor will return the last common ancestor of two chain of commit
- FindCommonAncestor(hash1 git.Hash, hash2 git.Hash) (git.Hash, error)
-
- // GetTreeHash return the git tree hash referenced in a commit
- GetTreeHash(commit git.Hash) (git.Hash, error)
}
// ClockedRepo is a Repo that also has Lamport clocks