aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
Diffstat (limited to 'cache')
-rw-r--r--cache/bug_cache.go6
-rw-r--r--cache/bug_excerpt.go6
-rw-r--r--cache/repo_cache.go9
3 files changed, 11 insertions, 10 deletions
diff --git a/cache/bug_cache.go b/cache/bug_cache.go
index c9e1f2f5..cbb0d15a 100644
--- a/cache/bug_cache.go
+++ b/cache/bug_cache.go
@@ -4,8 +4,8 @@ import (
"io"
"github.com/MichaelMure/git-bug/bug"
- "github.com/MichaelMure/git-bug/bug/operations"
- "github.com/MichaelMure/git-bug/util"
+ "github.com/MichaelMure/git-bug/operations"
+ "github.com/MichaelMure/git-bug/util/git"
)
type BugCache struct {
@@ -40,7 +40,7 @@ func (c *BugCache) AddComment(message string) error {
return c.notifyUpdated()
}
-func (c *BugCache) AddCommentWithFiles(message string, files []util.Hash) error {
+func (c *BugCache) AddCommentWithFiles(message string, files []git.Hash) error {
author, err := bug.GetUser(c.repoCache.repo)
if err != nil {
return err
diff --git a/cache/bug_excerpt.go b/cache/bug_excerpt.go
index a9dd6abb..426827e6 100644
--- a/cache/bug_excerpt.go
+++ b/cache/bug_excerpt.go
@@ -4,7 +4,7 @@ import (
"encoding/gob"
"github.com/MichaelMure/git-bug/bug"
- "github.com/MichaelMure/git-bug/util"
+ "github.com/MichaelMure/git-bug/util/lamport"
)
// BugExcerpt hold a subset of the bug values to be able to sort and filter bugs
@@ -12,8 +12,8 @@ import (
type BugExcerpt struct {
Id string
- CreateLamportTime util.LamportTime
- EditLamportTime util.LamportTime
+ CreateLamportTime lamport.Time
+ EditLamportTime lamport.Time
CreateUnixTime int64
EditUnixTime int64
diff --git a/cache/repo_cache.go b/cache/repo_cache.go
index cd743e92..d8b14501 100644
--- a/cache/repo_cache.go
+++ b/cache/repo_cache.go
@@ -13,9 +13,10 @@ import (
"strings"
"github.com/MichaelMure/git-bug/bug"
- "github.com/MichaelMure/git-bug/bug/operations"
+ "github.com/MichaelMure/git-bug/operations"
"github.com/MichaelMure/git-bug/repository"
- "github.com/MichaelMure/git-bug/util"
+ "github.com/MichaelMure/git-bug/util/git"
+ "github.com/MichaelMure/git-bug/util/process"
)
type RepoCache struct {
@@ -262,7 +263,7 @@ func (c *RepoCache) NewBug(title string, message string) (*BugCache, error) {
// 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 []util.Hash) (*BugCache, error) {
+func (c *RepoCache) NewBugWithFiles(title string, message string, files []git.Hash) (*BugCache, error) {
author, err := bug.GetUser(c.repo)
if err != nil {
return nil, err
@@ -382,7 +383,7 @@ func repoIsAvailable(repo repository.Repo) error {
return err
}
- if util.ProcessIsRunning(pid) {
+ if process.IsRunning(pid) {
return fmt.Errorf("the repository you want to access is already locked by the process pid %d", pid)
}