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
bc827dfd
Commit
bc827dfd
authored
Aug 02, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed review mode diffs
parent
6ce90bfb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
44 deletions
+15
-44
app/assets/javascripts/ide/stores/mutations.js
app/assets/javascripts/ide/stores/mutations.js
+1
-0
app/assets/javascripts/ide/stores/mutations/file.js
app/assets/javascripts/ide/stores/mutations/file.js
+9
-3
spec/javascripts/ide/stores/modules/commit/actions_spec.js
spec/javascripts/ide/stores/modules/commit/actions_spec.js
+1
-1
spec/javascripts/ide/stores/utils_spec.js
spec/javascripts/ide/stores/utils_spec.js
+4
-40
No files found.
app/assets/javascripts/ide/stores/mutations.js
View file @
bc827dfd
...
...
@@ -225,6 +225,7 @@ export default {
url
:
oldEntry
.
url
.
replace
(
new
RegExp
(
`
${
oldEntry
.
path
}
/?$`
),
newPath
),
tree
:
[],
parentPath
,
raw
:
''
,
};
oldEntry
.
moved
=
true
;
oldEntry
.
movedPath
=
newPath
;
...
...
app/assets/javascripts/ide/stores/mutations/file.js
View file @
bc827dfd
...
...
@@ -56,9 +56,15 @@ export default {
f
=>
f
.
path
===
file
.
path
&&
f
.
pending
&&
!
(
f
.
tempFile
&&
!
f
.
prevPath
),
);
if
(
file
.
tempFile
)
{
Object
.
assign
(
state
.
entries
[
file
.
path
],
{
content
:
raw
,
});
}
else
{
Object
.
assign
(
state
.
entries
[
file
.
path
],
{
raw
,
});
}
if
(
!
openPendingFile
)
return
;
...
...
spec/javascripts/ide/stores/modules/commit/actions_spec.js
View file @
bc827dfd
...
...
@@ -294,7 +294,7 @@ describe('IDE commit module actions', () => {
{
action
:
'
update
'
,
file_path
:
jasmine
.
anything
(),
content
:
jasmine
.
anything
()
,
content
:
undefined
,
encoding
:
jasmine
.
anything
(),
last_commit_id
:
undefined
,
previous_path
:
undefined
,
...
...
spec/javascripts/ide/stores/utils_spec.js
View file @
bc827dfd
...
...
@@ -125,7 +125,7 @@ describe('Multi-file store utils', () => {
{
action
:
'
delete
'
,
file_path
:
'
deletedFile
'
,
content
:
''
,
content
:
undefined
,
encoding
:
'
text
'
,
last_commit_id
:
undefined
,
previous_path
:
undefined
,
...
...
@@ -210,38 +210,17 @@ describe('Multi-file store utils', () => {
});
describe
(
'
getCommitFiles
'
,
()
=>
{
it
(
'
returns
flattened list of files and folder
s
'
,
()
=>
{
it
(
'
returns
list of files excluding moved file
s
'
,
()
=>
{
const
files
=
[
{
path
:
'
a
'
,
type
:
'
blob
'
,
deleted
:
true
,
},
{
path
:
'
b
'
,
type
:
'
tree
'
,
deleted
:
true
,
tree
:
[
{
path
:
'
c
'
,
type
:
'
blob
'
,
},
{
path
:
'
d
'
,
type
:
'
blob
'
,
},
],
},
{
path
:
'
c
'
,
prevPath
:
'
x
'
,
type
:
'
tree
'
,
tree
:
[
{
path
:
'
c/index.js
'
,
type
:
'
blob
'
,
},
],
moved
:
true
,
},
];
...
...
@@ -253,21 +232,6 @@ describe('Multi-file store utils', () => {
type
:
'
blob
'
,
deleted
:
true
,
},
{
path
:
'
c
'
,
type
:
'
blob
'
,
deleted
:
true
,
},
{
path
:
'
d
'
,
type
:
'
blob
'
,
deleted
:
true
,
},
{
path
:
'
c/index.js
'
,
type
:
'
blob
'
,
deleted
:
true
,
},
]);
});
});
...
...
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