MCPcopy Create free account
hub / github.com/cwarden/git-add--interactive / IsInitialCommit

Method IsInitialCommit

internal/git/repository.go:103–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101}
102
103func (r *Repository) IsInitialCommit() bool {
104 _, err := r.RunCommand("rev-parse", "HEAD")
105 return err != nil
106}
107
108func (r *Repository) GetEmptyTree() (string, error) {
109 output, err := r.RunCommand("hash-object", "-t", "tree", "/dev/null")

Callers 5

TestIsInitialCommitFunction · 0.95
ParseDiffMethod · 0.95
revertCmdMethod · 0.80
diffCmdMethod · 0.80

Calls 1

RunCommandMethod · 0.95

Tested by 1

TestIsInitialCommitFunction · 0.76