()
| 16 | ) |
| 17 | |
| 18 | func Version() (string, error) { |
| 19 | gitVersionOnce.Do(func() { |
| 20 | gitVersion, gitVersionErr = |
| 21 | subprocess.SimpleExec("git", "version") |
| 22 | }) |
| 23 | return gitVersion, gitVersionErr |
| 24 | } |
| 25 | |
| 26 | // IsVersionAtLeast returns whether the git version is the one specified or higher |
| 27 | // argument is plain version string separated by '.' e.g. "2.3.1" but can omit minor/patch |
no test coverage detected