From 1a0c86a12d68a2f0ee99cbff535c82e07b735108 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 4 Oct 2020 19:56:16 +0200 Subject: repo: use go-git in more places, fix push --- bug/bug_actions.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bug/bug_actions.go') 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/>/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 -- cgit