MCPcopy Create free account
hub / github.com/docker/buildx / IsUnknownRevision

Function IsUnknownRevision

util/gitutil/gitutil.go:130–137  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

128}
129
130func IsUnknownRevision(err error) bool {
131 if err == nil {
132 return false
133 }
134 // https://github.com/git/git/blob/a6a323b31e2bcbac2518bddec71ea7ad558870eb/setup.c#L204
135 errMsg := strings.ToLower(err.Error())
136 return strings.Contains(errMsg, "unknown revision or path not in the working tree") || strings.Contains(errMsg, "bad revision")
137}

Callers 2

TestGitFullCommitErrFunction · 0.92
TestGitShortCommitErrFunction · 0.92

Calls 1

ErrorMethod · 0.45

Tested by 2

TestGitFullCommitErrFunction · 0.74
TestGitShortCommitErrFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…