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

Method GetUserIdentityExcerpt

cache/repo_cache_common.go:209–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207}
208
209func (c *RepoCache) GetUserIdentityExcerpt() (*IdentityExcerpt, error) {
210 c.muUserIdentity.RLock()
211 if c.userIdentityId != "" {
212 defer c.muUserIdentity.RUnlock()
213 return c.identities.ResolveExcerpt(c.userIdentityId)
214 }
215 c.muUserIdentity.RUnlock()
216
217 c.muUserIdentity.Lock()
218 defer c.muUserIdentity.Unlock()
219
220 i, err := identity.GetUserIdentityId(c.repo)
221 if err != nil {
222 return nil, err
223 }
224
225 c.userIdentityId = i
226
227 return c.identities.ResolveExcerpt(i)
228}
229
230func (c *RepoCache) IsUserIdentitySet() (bool, error) {
231 return identity.IsUserIdentitySet(c.repo)

Callers

nothing calls this directly

Calls 3

GetUserIdentityIdFunction · 0.92
ResolveExcerptMethod · 0.80
LockMethod · 0.65

Tested by

no test coverage detected