MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / runGitCheckout

Function runGitCheckout

dgraphtest/image.go:192–199  ·  view source on GitHub ↗
(gitRef string)

Source from the content-addressed store, hash-verified

190}
191
192func runGitCheckout(gitRef string) error {
193 cmd := exec.Command("git", "checkout", "-f", gitRef)
194 cmd.Dir = repoDir
195 if out, err := cmd.CombinedOutput(); err != nil {
196 return errors.Wrapf(err, "error checking out gitRef [%v]\noutput:%v", gitRef, string(out))
197 }
198 return nil
199}
200
201func getHash(ref string) (string, error) {
202 cmd := exec.Command("git", "rev-parse", ref)

Callers 1

setupBinaryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected