Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile.lock2
-rw-r--r--app/views/projects/blame/show.html.haml14
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) }