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

Method IsInsideWorkTree

util/gitutil/gitutil.go:35–38  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

33}
34
35func (cli *GitCLI) IsInsideWorkTree(ctx context.Context) bool {
36 out, err := cli.clean(cli.Run(ctx, "rev-parse", "--is-inside-work-tree"))
37 return out == "true" && err == nil
38}
39
40func (cli *GitCLI) IsDirty(ctx context.Context) bool {
41 out, err := cli.Run(ctx, "status", "--porcelain", "--ignored")

Callers

nothing calls this directly

Calls 2

cleanMethod · 0.95
RunMethod · 0.80

Tested by

no test coverage detected