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

Function GetFileHistory

utils/git_utils.go:113–120  ·  view source on GitHub ↗

Função auxiliar para obter o histórico de um arquivo específico

(filepath string)

Source from the content-addressed store, hash-verified

111
112// Função auxiliar para obter o histórico de um arquivo específico
113func GetFileHistory(filepath string) (string, error) {
114 cmd := exec.Command("git", "log", "--follow", "--pretty=format:%h - %an, %ar : %s", "--", filepath) //#nosec G204 -- agent/CLI tool execution; commands validated by command_validator + policy_manager upstream
115 output, err := cmd.Output()
116 if err != nil {
117 return "", fmt.Errorf("erro ao obter histórico do arquivo %s: %w", filepath, err)
118 }
119 return string(output), nil
120}
121
122// Função auxiliar para obter blame de um arquivo
123func GetFileBlame(filepath string) (string, error) {

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.80
OutputMethod · 0.65

Tested by

no test coverage detected