Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
79ad6e0e
Commit
79ad6e0e
authored
Mar 18, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug where wrong commit ID was being used in a merge request diff to show old image
Closes #3769 Closes #14327
parent
64b57ec8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
CHANGELOG
CHANGELOG
+1
-0
app/views/projects/diffs/_diffs.html.haml
app/views/projects/diffs/_diffs.html.haml
+1
-1
app/views/projects/diffs/_file.html.haml
app/views/projects/diffs/_file.html.haml
+1
-1
app/views/projects/diffs/_image.html.haml
app/views/projects/diffs/_image.html.haml
+3
-2
No files found.
CHANGELOG
View file @
79ad6e0e
Please view this file on the master branch, on stable branches it's out of date.
v 8.6.0 (unreleased)
- Fix bug where wrong commit ID was being used in a merge request diff to show old image (Stan Hu)
- Add confidential issues
- Bump gitlab_git to 9.0.3 (Stan Hu)
- Support Golang subpackage fetching (Stan Hu)
...
...
app/views/projects/diffs/_diffs.html.haml
View file @
79ad6e0e
...
...
@@ -20,4 +20,4 @@
-
next
unless
blob
=
render
'projects/diffs/file'
,
i:
index
,
project:
project
,
diff_file:
diff_file
,
diff_commit:
diff_commit
,
blob:
blob
diff_file:
diff_file
,
diff_commit:
diff_commit
,
blob:
blob
,
diff_refs:
diff_refs
app/views/projects/diffs/_file.html.haml
View file @
79ad6e0e
...
...
@@ -53,6 +53,6 @@
=
render
"projects/diffs/text_file"
,
diff_file:
diff_file
,
index:
i
-
elsif
blob
.
image?
-
old_file
=
project
.
repository
.
prev_blob_for_diff
(
diff_commit
,
diff_file
)
=
render
"projects/diffs/image"
,
diff_file:
diff_file
,
old_file:
old_file
,
file:
blob
,
index:
i
=
render
"projects/diffs/image"
,
diff_file:
diff_file
,
old_file:
old_file
,
file:
blob
,
index:
i
,
diff_refs:
diff_refs
-
else
.nothing-here-block
No preview for this file type
app/views/projects/diffs/_image.html.haml
View file @
79ad6e0e
-
diff
=
diff_file
.
diff
-
file_raw_path
=
namespace_project_raw_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
id
,
diff
.
new_path
))
-
old_file_raw_path
=
namespace_project_raw_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
parent_id
,
diff
.
old_path
))
-
old_commit_id
=
diff_refs
.
first
.
id
-
old_file_raw_path
=
namespace_project_raw_path
(
@project
.
namespace
,
@project
,
tree_join
(
old_commit_id
,
diff
.
old_path
))
-
if
diff
.
renamed_file
||
diff
.
new_file
||
diff
.
deleted_file
.image
%span
.wrap
...
...
@@ -12,7 +13,7 @@
%div
.two-up.view
%span
.wrap
.frame.deleted
%a
{
href:
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
paren
t_id
,
diff
.
old_path
))}
%a
{
href:
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
old_commi
t_id
,
diff
.
old_path
))}
%img
{
src:
old_file_raw_path
}
%p
.image-info.hide
%span
.meta-filesize
=
"
#{
number_to_human_size
old_file
.
size
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment