MCPcopy
hub / github.com/mislav/hub / Version

Function Version

git/git.go:14–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12var GlobalFlags []string
13
14func Version() (string, error) {
15 versionCmd := gitCmd("version")
16 output, err := versionCmd.Output()
17 if err != nil {
18 return "", fmt.Errorf("error running git version: %s", err)
19 }
20 return firstLine(output), nil
21}
22
23var cachedDir string
24

Callers 1

reportTitleAndBodyFunction · 0.92

Calls 4

gitCmdFunction · 0.85
firstLineFunction · 0.85
OutputMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…