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
Léo-Paul Géneau
gitlab-ce
Commits
3d5f8fb5
Commit
3d5f8fb5
authored
Aug 02, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed un-used code
fixed folder deletions not adding to changedFiles
parent
6112d892
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
app/assets/javascripts/ide/stores/mutations.js
app/assets/javascripts/ide/stores/mutations.js
+1
-1
app/assets/javascripts/ide/stores/utils.js
app/assets/javascripts/ide/stores/utils.js
+1
-6
No files found.
app/assets/javascripts/ide/stores/mutations.js
View file @
3d5f8fb5
...
...
@@ -199,7 +199,7 @@ export default {
entry
.
deleted
=
true
;
parent
.
tree
.
splice
(
parent
.
tree
.
findIndex
(
f
=>
f
.
path
===
entry
.
path
),
1
);
parent
.
tree
=
parent
.
tree
.
filter
(
f
=>
f
.
path
!==
entry
.
path
);
if
(
entry
.
type
===
'
blob
'
)
{
state
.
changedFiles
=
state
.
changedFiles
.
concat
(
entry
);
...
...
app/assets/javascripts/ide/stores/utils.js
View file @
3d5f8fb5
...
...
@@ -121,17 +121,12 @@ export const commitActionForFile = file => {
return
'
update
'
;
};
export
const
getCommitFiles
=
(
stagedFiles
,
deleteTree
=
false
)
=>
export
const
getCommitFiles
=
stagedFiles
=>
stagedFiles
.
reduce
((
acc
,
file
)
=>
{
if
(
file
.
moved
)
return
acc
;
if
((
file
.
deleted
||
deleteTree
||
file
.
prevPath
)
&&
file
.
type
===
'
tree
'
)
{
return
acc
.
concat
(
getCommitFiles
(
file
.
tree
,
true
));
}
return
acc
.
concat
({
...
file
,
deleted
:
deleteTree
||
file
.
deleted
,
});
},
[]);
...
...
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