diff options
Diffstat (limited to 'app/models/event.rb')
-rw-r--r-- | app/models/event.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index ddb863c1be2..d43d6eb682f 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -56,11 +56,13 @@ class Event < ActiveRecord::Base end def create_ref_event(project, user, ref, action = 'add', prefix = 'refs/heads') + commit = project.repository.commit(ref.target) + if action.to_s == 'add' before = '00000000' - after = ref.commit.id + after = commit.id else - before = ref.commit.id + before = commit.id after = '00000000' end |