MCPcopy Create free account
hub / github.com/github/gh-aw / gitRefExists

Function gitRefExists

pkg/cli/experiments_command.go:757–760  ·  view source on GitHub ↗

gitRefExists reports whether a git ref exists locally.

(ref string)

Source from the content-addressed store, hash-verified

755
756// gitRefExists reports whether a git ref exists locally.
757func gitRefExists(ref string) bool {
758 cmd := exec.Command("git", "rev-parse", "--verify", ref)
759 return cmd.Run() == nil
760}
761
762// printExperimentDetails renders experiment details to stderr in human-readable form.
763func printExperimentDetails(d *ExperimentDetails) {

Callers 2

fetchLocalExperimentsFunction · 0.85

Calls 1

RunMethod · 0.45

Tested by

no test coverage detected