aboutsummaryrefslogtreecommitdiffstats
path: root/repository
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-01-25 12:39:34 +0100
committerMichael Muré <batolettre@gmail.com>2021-02-14 12:19:01 +0100
commitfe4237df3c62bd6dfd1f385893295f93072d0e51 (patch)
tree66eabac7a2aaae9f7b4f2aff07092556e3a2a2ac /repository
parentdc5059bc3372941e2908739831188768335ac50b (diff)
downloadgit-bug-fe4237df3c62bd6dfd1f385893295f93072d0e51.tar.gz
entity: readAll and more testing
Diffstat (limited to 'repository')
-rw-r--r--repository/mock_repo.go4
-rw-r--r--repository/repo.go1
-rw-r--r--repository/repo_testing.go3
3 files changed, 6 insertions, 2 deletions
diff --git a/repository/mock_repo.go b/repository/mock_repo.go
index 095ad61c..adbceec2 100644
--- a/repository/mock_repo.go
+++ b/repository/mock_repo.go
@@ -202,12 +202,12 @@ func NewMockRepoData() *mockRepoData {
}
func (r *mockRepoData) FetchRefs(remote string, refSpec string) (string, error) {
- return "", nil
+ panic("implement me")
}
// PushRefs push git refs to a remote
func (r *mockRepoData) PushRefs(remote string, refSpec string) (string, error) {
- return "", nil
+ panic("implement me")
}
func (r *mockRepoData) StoreData(data []byte) (Hash, error) {
diff --git a/repository/repo.go b/repository/repo.go
index 87426333..c31afa22 100644
--- a/repository/repo.go
+++ b/repository/repo.go
@@ -130,6 +130,7 @@ type RepoData interface {
ReadCommit(hash Hash) (Commit, error)
// GetTreeHash return the git tree hash referenced in a commit
+ // Deprecated
GetTreeHash(commit Hash) (Hash, error)
// ResolveRef returns the hash of the target commit of the given ref
diff --git a/repository/repo_testing.go b/repository/repo_testing.go
index 92aa1691..8fc109bb 100644
--- a/repository/repo_testing.go
+++ b/repository/repo_testing.go
@@ -10,6 +10,9 @@ import (
"github.com/MichaelMure/git-bug/util/lamport"
)
+// TODO: add tests for RepoBleve
+// TODO: add tests for RepoStorage
+
func CleanupTestRepos(repos ...Repo) {
var firstErr error
for _, repo := range repos {