#34: renamed file added into Added and Removed collections

This commit is contained in:
Vokhmin Alexey V 2013-05-14 15:39:14 +04:00
parent cbf1f1e3e1
commit 5e900a2dc9
1 changed files with 4 additions and 1 deletions

View File

@ -72,7 +72,10 @@ class Hook < ActiveRecord::Base
commits = project.repo.commits_between(oldrev, newrev)
removed, added, modified = [], [], []
project.repo.diff(oldrev, newrev).each do |diff|
if diff.new_file
if diff.renamed_file
added << diff.b_path
removed << diff.a_path
elsif diff.new_file
added << diff.b_path
elsif diff.deleted_file
removed << diff.a_path