diff options
author | Michael Muré <batolettre@gmail.com> | 2020-06-27 22:05:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-27 22:05:45 +0200 |
commit | 23228101a2a38a139f6fc2cafc18e9f08d911089 (patch) | |
tree | b6f73782f2f400a89fe0a777502a98fe505a080b /repository/repo.go | |
parent | 1e3dd82fd619f7b43b3193016232ef69f9707f42 (diff) | |
parent | 939bcd57b9446b9dce78d7a8c3b15fa13e6320f7 (diff) | |
download | git-bug-23228101a2a38a139f6fc2cafc18e9f08d911089.tar.gz |
Merge pull request #413 from MichaelMure/repo-more-tests
repo: more tests
Diffstat (limited to 'repository/repo.go')
-rw-r--r-- | repository/repo.go | 18 |
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 |