diff options
author | Michael Muré <batolettre@gmail.com> | 2020-09-16 16:22:02 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-10-04 20:39:10 +0200 |
commit | ca720f165cb286d4372ad48595e532a2423f2f07 (patch) | |
tree | 6e1496a1a6603abbd473cc0060a5acebc763a68b /identity/identity.go | |
parent | d56ce3d5d9f5ef74201a8ee7c25be4820d435b47 (diff) | |
download | git-bug-ca720f165cb286d4372ad48595e532a2423f2f07.tar.gz |
cache,bug,identity: structural change
- bug doesn't commit identities anymore, only make sure they are commit
- cache use an IdentityResolver to load bugs with identities from the cache (deps injection)
- IdentityCache now are identity.Interface
Diffstat (limited to 'identity/identity.go')
-rw-r--r-- | identity/identity.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/identity/identity.go b/identity/identity.go index c43cfd97..c960a1af 100644 --- a/identity/identity.go +++ b/identity/identity.go @@ -180,19 +180,19 @@ type StreamedIdentity struct { Err error } -// ReadAllLocalIdentities read and parse all local Identity -func ReadAllLocalIdentities(repo repository.ClockedRepo) <-chan StreamedIdentity { - return readAllIdentities(repo, identityRefPattern) +// ReadAllLocal read and parse all local Identity +func ReadAllLocal(repo repository.ClockedRepo) <-chan StreamedIdentity { + return readAll(repo, identityRefPattern) } -// ReadAllRemoteIdentities read and parse all remote Identity for a given remote -func ReadAllRemoteIdentities(repo repository.ClockedRepo, remote string) <-chan StreamedIdentity { +// ReadAllRemote read and parse all remote Identity for a given remote +func ReadAllRemote(repo repository.ClockedRepo, remote string) <-chan StreamedIdentity { refPrefix := fmt.Sprintf(identityRemoteRefPattern, remote) - return readAllIdentities(repo, refPrefix) + return readAll(repo, refPrefix) } -// Read and parse all available bug with a given ref prefix -func readAllIdentities(repo repository.ClockedRepo, refPrefix string) <-chan StreamedIdentity { +// readAll read and parse all available bug with a given ref prefix +func readAll(repo repository.ClockedRepo, refPrefix string) <-chan StreamedIdentity { out := make(chan StreamedIdentity) go func() { |