aboutsummaryrefslogtreecommitdiffstats
path: root/bug/bug_actions.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-10-04 19:56:16 +0200
committerMichael Muré <batolettre@gmail.com>2020-10-04 19:56:16 +0200
commit1a0c86a12d68a2f0ee99cbff535c82e07b735108 (patch)
treecd83782c576f2869555913d753de1351ff94a547 /bug/bug_actions.go
parent9bc2483df054387c1241b2e1644ab7e6e9bc4e9a (diff)
downloadgit-bug-1a0c86a12d68a2f0ee99cbff535c82e07b735108.tar.gz
repo: use go-git in more places, fix push
Diffstat (limited to 'bug/bug_actions.go')
-rw-r--r--bug/bug_actions.go6
1 files changed, 5 insertions, 1 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