MCPcopy Index your code
hub / github.com/LunaSource/Luna / GetFileDiff

Function GetFileDiff

git/git.go:28–34  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

26}
27
28func GetFileDiff(filename string) (string, error) {
29 diff, err := exec.Command("git", "diff", "--cached", "--", filename).Output()
30 if err != nil {
31 return "", fmt.Errorf("error getting diff for %s: %v", filename, err)
32 }
33 return string(diff), nil
34}
35
36func ShouldIgnoreFile(filename string, cfg config.Config) bool {
37 for _, ignoredFile := range cfg.IgnoredFiles {

Callers 2

processNextFileFunction · 0.92
handleReviewInputFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected