aboutsummaryrefslogtreecommitdiffstats
path: root/cache/repo_cache.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-07-01 19:39:02 +0200
committerMichael Muré <batolettre@gmail.com>2020-07-01 19:39:02 +0200
commit3cf31fc4049fefc82db0a3d2018b5d98ab77c5d7 (patch)
treec77a29e1f35fefa5040454976c6edcf86e7678bc /cache/repo_cache.go
parent33d510ac3999b3d8fa7a4652dc44a21c713f97de (diff)
downloadgit-bug-3cf31fc4049fefc82db0a3d2018b5d98ab77c5d7.tar.gz
repository: merge git.Hash in for one less /util package
Diffstat (limited to 'cache/repo_cache.go')
-rw-r--r--cache/repo_cache.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/cache/repo_cache.go b/cache/repo_cache.go
index 92760bbb..f778c944 100644
--- a/cache/repo_cache.go
+++ b/cache/repo_cache.go
@@ -21,7 +21,6 @@ import (
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/query"
"github.com/MichaelMure/git-bug/repository"
- "github.com/MichaelMure/git-bug/util/git"
"github.com/MichaelMure/git-bug/util/process"
)
@@ -143,12 +142,12 @@ func (c *RepoCache) GetUserEmail() (string, error) {
}
// ReadData will attempt to read arbitrary data from the given hash
-func (c *RepoCache) ReadData(hash git.Hash) ([]byte, error) {
+func (c *RepoCache) ReadData(hash repository.Hash) ([]byte, error) {
return c.repo.ReadData(hash)
}
// StoreData will store arbitrary data and return the corresponding hash
-func (c *RepoCache) StoreData(data []byte) (git.Hash, error) {
+func (c *RepoCache) StoreData(data []byte) (repository.Hash, error) {
return c.repo.StoreData(data)
}
@@ -637,7 +636,7 @@ func (c *RepoCache) NewBug(title string, message string) (*BugCache, *bug.Create
// NewBugWithFiles create a new bug with attached files for the message
// The new bug is written in the repository (commit)
-func (c *RepoCache) NewBugWithFiles(title string, message string, files []git.Hash) (*BugCache, *bug.CreateOperation, error) {
+func (c *RepoCache) NewBugWithFiles(title string, message string, files []repository.Hash) (*BugCache, *bug.CreateOperation, error) {
author, err := c.GetUserIdentity()
if err != nil {
return nil, nil, err
@@ -649,7 +648,7 @@ func (c *RepoCache) NewBugWithFiles(title string, message string, files []git.Ha
// NewBugWithFilesMeta create a new bug with attached files for the message, as
// well as metadata for the Create operation.
// The new bug is written in the repository (commit)
-func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title string, message string, files []git.Hash, metadata map[string]string) (*BugCache, *bug.CreateOperation, error) {
+func (c *RepoCache) NewBugRaw(author *IdentityCache, unixTime int64, title string, message string, files []repository.Hash, metadata map[string]string) (*BugCache, *bug.CreateOperation, error) {
b, op, err := bug.CreateWithFiles(author.Identity, unixTime, title, message, files)
if err != nil {
return nil, nil, err