Ignore file rename / remove operations as they don't contribute to the codebase. (#1)

This commit is contained in:
2025-12-16 19:11:25 +00:00
committed by GitHub
parent 8423b6ada1
commit aedcf87338
3 changed files with 47 additions and 0 deletions
+5
View File
@@ -397,6 +397,11 @@ func (r *Repository) getCommitStats(c *object.Commit, testPatterns []string) com
filesSet := make(map[string]bool)
for _, change := range changes {
// Skip rename/move operations - they don't represent actual code contribution
if diff.IsRenameOrMove(change.From.Name, change.To.Name) {
continue
}
// Get the file path
var filePath string
if change.To.Name != "" {