summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm/adapters/git_adapter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/scm/adapters/git_adapter.rb')
-rw-r--r--lib/redmine/scm/adapters/git_adapter.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb
index 0c916c283..f4c3902e2 100644
--- a/lib/redmine/scm/adapters/git_adapter.rb
+++ b/lib/redmine/scm/adapters/git_adapter.rb
@@ -376,11 +376,14 @@ module Redmine
identifier = ''
# git shows commit author on the first occurrence only
authors_by_commit = {}
+ prev_blames_by_commit = {}
content.split("\n").each do |line|
if line =~ /^([0-9a-f]{39,40})\s.*/
identifier = $1
elsif line =~ /^author (.+)/
authors_by_commit[identifier] = $1.strip
+ elsif line =~ /^previous (.+)/
+ prev_blames_by_commit[identifier] = $1.strip
elsif line =~ /^\t(.*)/
blame.add_line(
$1,
@@ -389,7 +392,8 @@ module Redmine
:revision => identifier,
:scmid => identifier,
:author => authors_by_commit[identifier]
- )
+ ),
+ prev_blames_by_commit[identifier]
)
identifier = ''
author = ''