MCPcopy Index your code
hub / github.com/git-bug/git-bug / GetUserIdentity

Method GetUserIdentity

cache/repo_cache_common.go:188–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186}
187
188func (c *RepoCache) GetUserIdentity() (*IdentityCache, error) {
189 c.muUserIdentity.RLock()
190 if c.userIdentityId != "" {
191 defer c.muUserIdentity.RUnlock()
192 return c.identities.Resolve(c.userIdentityId)
193 }
194 c.muUserIdentity.RUnlock()
195
196 c.muUserIdentity.Lock()
197 defer c.muUserIdentity.Unlock()
198
199 i, err := identity.GetUserIdentityId(c.repo)
200 if err != nil {
201 return nil, err
202 }
203
204 c.userIdentityId = i
205
206 return c.identities.Resolve(i)
207}
208
209func (c *RepoCache) GetUserIdentityExcerpt() (*IdentityExcerpt, error) {
210 c.muUserIdentity.RLock()

Callers 4

TestCacheFunction · 0.80
FinishConfigFunction · 0.80
runBridgeAuthAddTokenFunction · 0.80
runUserShowFunction · 0.80

Calls 3

GetUserIdentityIdFunction · 0.92
ResolveMethod · 0.65
LockMethod · 0.65

Tested by 1

TestCacheFunction · 0.64