aboutsummaryrefslogtreecommitdiffstats
path: root/bug/bug_actions.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-10-04 20:09:36 +0200
committerGitHub <noreply@github.com>2020-10-04 20:09:36 +0200
commitd56ce3d5d9f5ef74201a8ee7c25be4820d435b47 (patch)
tree4382550c1e8387b7cb6b13c6dd32508c24e6c4ca /bug/bug_actions.go
parent9bc2483df054387c1241b2e1644ab7e6e9bc4e9a (diff)
parent1eb13173183cf402e4197be51935a4b3ddacf256 (diff)
downloadgit-bug-d56ce3d5d9f5ef74201a8ee7c25be4820d435b47.tar.gz
Merge pull request #460 from MichaelMure/fix-push
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