aboutsummaryrefslogtreecommitdiffstats
path: root/bug
diff options
context:
space:
mode:
Diffstat (limited to 'bug')
-rw-r--r--bug/bug_actions.go6
-rw-r--r--bug/bug_test.go6
-rw-r--r--bug/operation_test.go2
3 files changed, 9 insertions, 5 deletions
diff --git a/bug/bug_actions.go b/bug/bug_actions.go
index cb0d0f7d..f99f83ad 100644
--- a/bug/bug_actions.go
+++ b/bug/bug_actions.go
@@ -12,6 +12,7 @@ import (
// Fetch retrieve updates from a remote
// This does not change the local bugs state
func Fetch(repo repository.Repo, remote string) (string, error) {
+ // "refs/bugs/*:refs/remotes/<remote>>/bugs/*"
remoteRefSpec := fmt.Sprintf(bugsRemoteRefPattern, remote)
fetchRefSpec := fmt.Sprintf("%s*:%s*", bugsRefPattern, remoteRefSpec)
@@ -20,7 +21,10 @@ func Fetch(repo repository.Repo, remote string) (string, error) {
// Push update a remote with the local changes
func Push(repo repository.Repo, remote string) (string, error) {
- return repo.PushRefs(remote, bugsRefPattern+"*")
+ // "refs/bugs/*:refs/bugs/*"
+ refspec := fmt.Sprintf("%s*:%s*", bugsRefPattern, bugsRefPattern)
+
+ return repo.PushRefs(remote, refspec)
}
// Pull will do a Fetch + MergeAll
diff --git a/bug/bug_test.go b/bug/bug_test.go
index 400e50f8..ac7da693 100644
--- a/bug/bug_test.go
+++ b/bug/bug_test.go
@@ -117,9 +117,9 @@ func equivalentBug(t *testing.T, expected, actual *Bug) {
}
func TestBugRemove(t *testing.T) {
- repo := repository.CreateTestRepo(false)
- remoteA := repository.CreateTestRepo(true)
- remoteB := repository.CreateTestRepo(true)
+ repo := repository.CreateGoGitTestRepo(false)
+ remoteA := repository.CreateGoGitTestRepo(true)
+ remoteB := repository.CreateGoGitTestRepo(true)
defer repository.CleanupTestRepos(repo, remoteA, remoteB)
err := repo.AddRemote("remoteA", "file://"+remoteA.GetPath())
diff --git a/bug/operation_test.go b/bug/operation_test.go
index 285bdbd6..21ae5eff 100644
--- a/bug/operation_test.go
+++ b/bug/operation_test.go
@@ -79,7 +79,7 @@ func TestMetadata(t *testing.T) {
}
func TestID(t *testing.T) {
- repo := repository.CreateTestRepo(false)
+ repo := repository.CreateGoGitTestRepo(false)
defer repository.CleanupTestRepos(repo)
repos := []repository.ClockedRepo{