aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/commands.go1
-rw-r--r--commands/new.go2
-rw-r--r--commands/pull.go3
-rw-r--r--commands/push.go3
4 files changed, 5 insertions, 4 deletions
diff --git a/commands/commands.go b/commands/commands.go
index 2cc16380..343d1c71 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -5,7 +5,6 @@ import (
"github.com/MichaelMure/git-bug/repository"
)
-const bugsRefPattern = "refs/bugs/*"
const messageFilename = "BUG_MESSAGE_EDITMSG"
// Command represents the definition of a single command.
diff --git a/commands/new.go b/commands/new.go
index f3127fc6..ab237e32 100644
--- a/commands/new.go
+++ b/commands/new.go
@@ -59,7 +59,7 @@ func RunNewBug(repo repository.Repo, args []string) error {
createOp := operations.NewCreateOp(author, title, *newMessage)
newbug.Append(createOp)
- newbug.Commit()
+ newbug.Commit(repo)
return nil
diff --git a/commands/pull.go b/commands/pull.go
index 20009a00..b3541c0f 100644
--- a/commands/pull.go
+++ b/commands/pull.go
@@ -3,6 +3,7 @@ package commands
import (
"errors"
"fmt"
+ "github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/repository"
)
@@ -16,7 +17,7 @@ func pull(repo repository.Repo, args []string) error {
remote = args[0]
}
- if err := repo.PullRefs(remote, bugsRefPattern); err != nil {
+ if err := repo.PullRefs(remote, bug.BugsRefPattern+"*"); err != nil {
return err
}
return nil
diff --git a/commands/push.go b/commands/push.go
index 9b808511..54a657b9 100644
--- a/commands/push.go
+++ b/commands/push.go
@@ -3,6 +3,7 @@ package commands
import (
"errors"
"fmt"
+ "github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/repository"
)
@@ -16,7 +17,7 @@ func push(repo repository.Repo, args []string) error {
remote = args[0]
}
- if err := repo.PushRefs(remote, bugsRefPattern); err != nil {
+ if err := repo.PushRefs(remote, bug.BugsRefPattern+"*"); err != nil {
return err
}
return nil