diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-13 21:21:24 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-13 21:21:24 +0200 |
commit | 1779a0f3b92d58654b43444addeaf437a64d77a8 (patch) | |
tree | 9f973413454894f0456d7379425070d468712242 /commands | |
parent | 289f8d53ee960d35c1f0c42e8753ad536737b875 (diff) | |
download | git-bug-1779a0f3b92d58654b43444addeaf437a64d77a8.tar.gz |
serialize a Bug to git as a blob+tree+commit+ref
Diffstat (limited to 'commands')
-rw-r--r-- | commands/commands.go | 1 | ||||
-rw-r--r-- | commands/new.go | 2 | ||||
-rw-r--r-- | commands/pull.go | 3 | ||||
-rw-r--r-- | commands/push.go | 3 |
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 |