MCPcopy Create free account
hub / github.com/appleboy/drone-git-push / TestCleanTree

Function TestCleanTree

repo/commit.go:49–59  ·  view source on GitHub ↗

TestCleanTree returns non-zero if diff between index and local repository

(ctx context.Context)

Source from the content-addressed store, hash-verified

47
48// TestCleanTree returns non-zero if diff between index and local repository
49func TestCleanTree(ctx context.Context) *exec.Cmd {
50 cmd := exec.CommandContext(
51 ctx,
52 "git",
53 "diff-index",
54 "--quiet",
55 "HEAD",
56 "--ignore-submodules")
57
58 return cmd
59}
60
61// EmptyCommit simply create an empty commit
62func EmptyCommit(

Callers 1

HandleCommitMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected