diff options
author | Michael Muré <batolettre@gmail.com> | 2021-04-09 13:01:14 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-04-09 13:01:14 +0200 |
commit | 1520f678f7a2bc6e01d9b01df5ce49f2f46be7d7 (patch) | |
tree | f6d71c1f29cf06ccab9e4ae434b19ab17caa4385 /identity/identity_actions.go | |
parent | 0fd570171d171aa574d7f01d6033a9c01d668465 (diff) | |
parent | bc5f618eba812859bf87ce2c31b278bd518d4555 (diff) | |
download | git-bug-1520f678f7a2bc6e01d9b01df5ce49f2f46be7d7.tar.gz |
Merge remote-tracking branch 'origin/master' into dev-gh-bridge
Diffstat (limited to 'identity/identity_actions.go')
-rw-r--r-- | identity/identity_actions.go | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/identity/identity_actions.go b/identity/identity_actions.go index 2e804533..b58bb2d9 100644 --- a/identity/identity_actions.go +++ b/identity/identity_actions.go @@ -13,19 +13,12 @@ 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) - - return repo.FetchRefs(remote, fetchRefSpec) + return repo.FetchRefs(remote, "identities") } // Push update a remote with the local changes func Push(repo repository.Repo, remote string) (string, error) { - // "refs/identities/*:refs/identities/*" - refspec := fmt.Sprintf("%s*:%s*", identityRefPattern, identityRefPattern) - - return repo.PushRefs(remote, refspec) + return repo.PushRefs(remote, "identities") } // Pull will do a Fetch + MergeAll @@ -102,7 +95,7 @@ func MergeAll(repo repository.ClockedRepo, remote string) <-chan entity.MergeRes return } - out <- entity.NewMergeStatus(entity.MergeStatusNew, id, remoteIdentity) + out <- entity.NewMergeNewStatus(id, remoteIdentity) continue } @@ -121,9 +114,9 @@ func MergeAll(repo repository.ClockedRepo, remote string) <-chan entity.MergeRes } if updated { - out <- entity.NewMergeStatus(entity.MergeStatusUpdated, id, localIdentity) + out <- entity.NewMergeUpdatedStatus(id, localIdentity) } else { - out <- entity.NewMergeStatus(entity.MergeStatusNothing, id, localIdentity) + out <- entity.NewMergeNothingStatus(id) } } }() |