()
| 206 | } |
| 207 | |
| 208 | func (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 | |
| 223 | func (c *Configuration) IsDefaultRemote() bool { |
| 224 | return c.Remote() == defaultRemote |
no test coverage detected