Skip to content
Browse files

Only Track Files at HEAD

For each Fix, only add files that still exist at the HEAD of the repo
branch.
  • Loading branch information...
1 parent f93134d commit d259b6fc0df415cea857679d1451dda32e3c1e43 @msgerbush msgerbush committed Jan 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/bugspots/scanner.rb
View
2 lib/bugspots/scanner.rb
@@ -17,7 +17,7 @@ def self.scan(repo, branch = "master", depth = 500, words = nil)
repo.commits(branch, depth).each do |commit|
if commit.message =~ message_matchers
- files = commit.stats.files.map {|s| s.first}
+ files = commit.stats.files.map {|s| s.first}.select{ |s| repo.tree(branch)/s }
fixes << Fix.new(commit.short_message, commit.date, files)
end
end

0 comments on commit d259b6f

Please sign in to comment.
Something went wrong with that request. Please try again.