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

Method GetEmptyTree

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

Source from the content-addressed store, hash-verified

106}
107
108func (r *Repository) GetEmptyTree() (string, error) {
109 output, err := r.RunCommand("hash-object", "-t", "tree", "/dev/null")
110 if err != nil {
111 return "", err
112 }
113 return strings.TrimSpace(string(output)), nil
114}
115
116func (r *Repository) UpdateIndex() error {
117 cmd := exec.Command("git", "update-index", "--refresh")

Callers 3

ParseDiffMethod · 0.95
diffCmdMethod · 0.80

Calls 1

RunCommandMethod · 0.95

Tested by

no test coverage detected