Skip to content
Snippets Groups Projects
Verified Commit d29bb23a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Update gitlab-grit to newer version with normal diff collection. Show if file mode was changed

parent b48bb4a7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -164,7 +164,7 @@ GEM
multi_json
gitlab-grack (2.0.0.pre)
rack (~> 1.5.1)
gitlab-grit (2.6.8)
gitlab-grit (2.6.9)
charlock_holmes (~> 0.6)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
Loading
Loading
Loading
Loading
@@ -11,7 +11,6 @@
 
> span {
font-family: $monospace_font;
font-size: 14px;
line-height: 2;
}
 
Loading
Loading
@@ -19,9 +18,7 @@
float: right;
 
.btn {
background-color: #EEE;
color: #666;
font-weight: bolder;
background-color: #FFF;
}
}
 
Loading
Loading
@@ -32,6 +29,7 @@
 
.file-mode {
font-family: $monospace_font;
margin-left: 10px;
}
}
.diff-content {
Loading
Loading
@@ -51,6 +49,11 @@
}
}
 
.file-mode-changed {
padding: 10px;
color: #777;
}
table {
width: 100%;
font-family: $monospace_font;
Loading
Loading
Loading
Loading
@@ -216,4 +216,8 @@ module CommitsHelper
link_to(text.html_safe, user_path(user), options)
end
end
def diff_file_mode_changed?(diff)
diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
end
end
Loading
Loading
@@ -42,7 +42,6 @@
.files
- unless @suppress_diff
- diffs.each_with_index do |diff, i|
- next if diff.diff.empty?
- file = project.repository.blob_at(@commit.id, diff.new_path)
- file = project.repository.blob_at(@commit.parent_id, diff.old_path) unless file
- next unless file
Loading
Loading
@@ -58,7 +57,7 @@
%span.commit-short-id= @commit.short_id(6)
- else
%span= diff.new_path
- if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
- if diff_file_mode_changed?(diff)
%span.file-mode= "#{diff.a_mode}#{diff.b_mode}"
 
.diff-btn-group
Loading
Loading
Loading
Loading
@@ -22,3 +22,6 @@
- unless comments.empty?
= render "projects/notes/diff_notes_with_reply", notes: comments, line: line
 
- if diff.diff.blank? && diff_file_mode_changed?(diff)
.file-mode-changed
File mode changed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment