diff options
author | skv <skv-headless@yandex.ru> | 2014-09-24 11:35:13 +0400 |
---|---|---|
committer | skv <skv-headless@yandex.ru> | 2014-09-24 11:35:13 +0400 |
commit | a286f920508368eafabdb934cc2f50e04e5c8ada (patch) | |
tree | 95172c81b72fc4271c1871c517c250074347a1f1 | |
parent | b43e918a73c88a8d922c5c5d79e2aa2bf42a9d29 (diff) | |
download | gitlab-ce-a286f920508368eafabdb934cc2f50e04e5c8ada.tar.gz |
blame with rugged
-rw-r--r-- | Gemfile.lock | 2 | ||||
-rw-r--r-- | app/views/projects/blame/show.html.haml | 14 |
2 files changed, 5 insertions, 11 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index e9be030a8fa..e3da9757851 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -179,7 +179,7 @@ GEM mime-types (~> 1.19) gitlab_emoji (0.0.1.1) emoji (~> 1.0.1) - gitlab_git (6.2.1) + gitlab_git (6.3.0) activesupport (~> 4.0) charlock_holmes (~> 0.6) gitlab-grit (~> 2.6) diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index 64bbd495102..464e7ca40e1 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -10,8 +10,7 @@ %span.options= render "projects/blob/actions" .file-content.blame.highlight %table - - current_line = 1 - - @blame.each do |commit, lines| + - @blame.each do |commit, lines, since| - commit = Commit.new(commit) %tr %td.blame-commit @@ -23,14 +22,9 @@ = link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title" %td.lines.blame-numbers %pre - - if lines.empty? - = current_line - - current_line += 1 - - else - - lines.each do |line| - = current_line - \ - - current_line += 1 + - (since...(since + lines.count)).each do |i| + = i + \ %td.lines %pre %code{ class: highlightjs_class(@blob.name) } |