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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
fea95f88
Commit
fea95f88
authored
Dec 11, 2020
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Identify diff files
parent
cd3242a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
app/assets/javascripts/diffs/utils/diff_file.js
app/assets/javascripts/diffs/utils/diff_file.js
+8
-0
No files found.
app/assets/javascripts/diffs/utils/diff_file.js
View file @
fea95f88
...
...
@@ -4,6 +4,7 @@ import {
DIFF_FILE_MANUAL_COLLAPSE
,
DIFF_FILE_AUTOMATIC_COLLAPSE
,
}
from
'
../constants
'
;
import
{
uuids
}
from
'
./uuids
'
;
function
fileSymlinkInformation
(
file
,
fileList
)
{
const
duplicates
=
fileList
.
filter
(
iteratedFile
=>
iteratedFile
.
file_hash
===
file
.
file_hash
);
...
...
@@ -32,8 +33,15 @@ function collapsed(file) {
};
}
export
function
identifier
({
file
})
{
return
uuids
({
seeds
:
[
file
.
file_identifier_hash
,
file
.
content_sha
],
})[
0
];
}
export
function
prepareRawDiffFile
({
file
,
allFiles
})
{
Object
.
assign
(
file
,
{
id
:
identifier
({
file
}),
brokenSymlink
:
fileSymlinkInformation
(
file
,
allFiles
),
viewer
:
{
...
file
.
viewer
,
...
...
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