aboutsummaryrefslogtreecommitdiffstats
path: root/bug
diff options
context:
space:
mode:
Diffstat (limited to 'bug')
-rw-r--r--bug/bug_test.go4
-rw-r--r--bug/operation_pack.go5
2 files changed, 5 insertions, 4 deletions
diff --git a/bug/bug_test.go b/bug/bug_test.go
index 05f6e617..6363f4e9 100644
--- a/bug/bug_test.go
+++ b/bug/bug_test.go
@@ -130,10 +130,10 @@ func TestBugRemove(t *testing.T) {
remoteB := repository.CreateGoGitTestRepo(true)
defer repository.CleanupTestRepos(repo, remoteA, remoteB)
- err := repo.AddRemote("remoteA", "file://"+remoteA.GetPath())
+ err := repo.AddRemote("remoteA", remoteA.GetLocalRemote())
require.NoError(t, err)
- err = repo.AddRemote("remoteB", "file://"+remoteB.GetPath())
+ err = repo.AddRemote("remoteB", remoteB.GetLocalRemote())
require.NoError(t, err)
// generate a bunch of bugs
diff --git a/bug/operation_pack.go b/bug/operation_pack.go
index 0bd3fb7d..1a8ef0db 100644
--- a/bug/operation_pack.go
+++ b/bug/operation_pack.go
@@ -6,6 +6,7 @@ import (
"github.com/pkg/errors"
+ "github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/repository"
)
@@ -47,10 +48,10 @@ func (opp *OperationPack) UnmarshalJSON(data []byte) error {
}
if aux.Version < formatVersion {
- return fmt.Errorf("outdated repository format, please use https://github.com/MichaelMure/git-bug-migration to upgrade")
+ return entity.NewErrOldFormatVersion(aux.Version)
}
if aux.Version > formatVersion {
- return fmt.Errorf("your version of git-bug is too old for this repository (version %v), please upgrade to the latest version", aux.Version)
+ return entity.NewErrNewFormatVersion(aux.Version)
}
for _, raw := range aux.Operations {