aboutsummaryrefslogtreecommitdiffstats
path: root/identity/identity_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 /identity/identity_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 'identity/identity_actions.go')
-rw-r--r--identity/identity_actions.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/identity/identity_actions.go b/identity/identity_actions.go
index e33b75f9..2e804533 100644
--- a/identity/identity_actions.go
+++ b/identity/identity_actions.go
@@ -13,6 +13,7 @@ import (
// Fetch retrieve updates from a remote
// This does not change the local identities state
func Fetch(repo repository.Repo, remote string) (string, error) {
+ // "refs/identities/*:refs/remotes/<remote>/identities/*"
remoteRefSpec := fmt.Sprintf(identityRemoteRefPattern, remote)
fetchRefSpec := fmt.Sprintf("%s*:%s*", identityRefPattern, remoteRefSpec)
@@ -21,7 +22,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, identityRefPattern+"*")
+ // "refs/identities/*:refs/identities/*"
+ refspec := fmt.Sprintf("%s*:%s*", identityRefPattern, identityRefPattern)
+
+ return repo.PushRefs(remote, refspec)
}
// Pull will do a Fetch + MergeAll