MCPcopy
hub / github.com/git-lfs/git-lfs / CurrentRef

Method CurrentRef

config/config.go:208–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206}
207
208func (c *Configuration) CurrentRef() *git.Ref {
209 c.loading.Lock()
210 defer c.loading.Unlock()
211 if c.ref == nil {
212 r, err := git.CurrentRef()
213 if err != nil {
214 tracerx.Printf("Error loading current ref: %s", err)
215 c.ref = &git.Ref{}
216 } else {
217 c.ref = r
218 }
219 }
220 return c.ref
221}
222
223func (c *Configuration) IsDefaultRemote() bool {
224 return c.Remote() == defaultRemote

Callers 7

RemoteMethod · 0.95
PushRemoteMethod · 0.95
RemoteRefMethod · 0.80
locksCommandFunction · 0.80
lockCommandFunction · 0.80
currentRemoteRefFunction · 0.80
unlockCommandFunction · 0.80

Calls 3

CurrentRefFunction · 0.92
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected