MCPcopy Index your code
hub / github.com/coder/coder / gitOutput

Function gitOutput

scripts/releaser/git.go:10–21  ·  view source on GitHub ↗

gitOutput runs a read-only git command and returns trimmed stdout.

(args ...string)

Source from the content-addressed store, hash-verified

8
9// gitOutput runs a read-only git command and returns trimmed stdout.
10func gitOutput(args ...string) (string, error) {
11 cmd := exec.Command("git", args...)
12 out, err := cmd.Output()
13 if err != nil {
14 var exitErr *exec.ExitError
15 if errors.As(err, &exitErr) {
16 return "", exitErr
17 }
18 return "", err
19 }
20 return strings.TrimSpace(string(out)), nil
21}
22
23// gitRun runs a git command with stdout/stderr connected to the
24// terminal.

Callers 6

runReleaseFunction · 0.85
commitLogFunction · 0.85
updateReleaseDocsFunction · 0.85
mainFunction · 0.85
allSemverTagsFunction · 0.85
mergedSemverTagsFunction · 0.85

Calls 3

CommandMethod · 0.80
AsMethod · 0.80
OutputMethod · 0.65

Tested by

no test coverage detected