Commit d29bb23a6896c1c660fe27d1a9bd5dbfde94bf52
1 parent
b48bb4a7
Exists in
spb-stable
and in
2 other branches
Update gitlab-grit to newer version with normal diff collection. Show if file mode was changed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
5 changed files
with
16 additions
and
7 deletions
Show diff stats
Gemfile.lock
app/assets/stylesheets/sections/diff.scss
... | ... | @@ -11,7 +11,6 @@ |
11 | 11 | |
12 | 12 | > span { |
13 | 13 | font-family: $monospace_font; |
14 | - font-size: 14px; | |
15 | 14 | line-height: 2; |
16 | 15 | } |
17 | 16 | |
... | ... | @@ -19,9 +18,7 @@ |
19 | 18 | float: right; |
20 | 19 | |
21 | 20 | .btn { |
22 | - background-color: #EEE; | |
23 | - color: #666; | |
24 | - font-weight: bolder; | |
21 | + background-color: #FFF; | |
25 | 22 | } |
26 | 23 | } |
27 | 24 | |
... | ... | @@ -32,6 +29,7 @@ |
32 | 29 | |
33 | 30 | .file-mode { |
34 | 31 | font-family: $monospace_font; |
32 | + margin-left: 10px; | |
35 | 33 | } |
36 | 34 | } |
37 | 35 | .diff-content { |
... | ... | @@ -51,6 +49,11 @@ |
51 | 49 | } |
52 | 50 | } |
53 | 51 | |
52 | + .file-mode-changed { | |
53 | + padding: 10px; | |
54 | + color: #777; | |
55 | + } | |
56 | + | |
54 | 57 | table { |
55 | 58 | width: 100%; |
56 | 59 | font-family: $monospace_font; | ... | ... |
app/helpers/commits_helper.rb
app/views/projects/commits/_diffs.html.haml
... | ... | @@ -42,7 +42,6 @@ |
42 | 42 | .files |
43 | 43 | - unless @suppress_diff |
44 | 44 | - diffs.each_with_index do |diff, i| |
45 | - - next if diff.diff.empty? | |
46 | 45 | - file = project.repository.blob_at(@commit.id, diff.new_path) |
47 | 46 | - file = project.repository.blob_at(@commit.parent_id, diff.old_path) unless file |
48 | 47 | - next unless file |
... | ... | @@ -58,7 +57,7 @@ |
58 | 57 | %span.commit-short-id= @commit.short_id(6) |
59 | 58 | - else |
60 | 59 | %span= diff.new_path |
61 | - - if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode | |
60 | + - if diff_file_mode_changed?(diff) | |
62 | 61 | %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}" |
63 | 62 | |
64 | 63 | .diff-btn-group | ... | ... |
app/views/projects/commits/_text_file.html.haml