MCPcopy Create free account
hub / github.com/diillson/chatcli / GetFileBlame

Function GetFileBlame

utils/git_utils.go:123–130  ·  view source on GitHub ↗

Função auxiliar para obter blame de um arquivo

(filepath string)

Source from the content-addressed store, hash-verified

121
122// Função auxiliar para obter blame de um arquivo
123func GetFileBlame(filepath string) (string, error) {
124 cmd := exec.Command("git", "blame", filepath) //#nosec G204 -- agent/CLI tool execution; commands validated by command_validator + policy_manager upstream
125 output, err := cmd.Output()
126 if err != nil {
127 return "", fmt.Errorf("erro ao obter blame do arquivo %s: %w", filepath, err)
128 }
129 return string(output), nil
130}

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.80
OutputMethod · 0.65

Tested by

no test coverage detected