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
13715f3b
Commit
13715f3b
authored
Aug 19, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
5bb340bf
0d79fe7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletion
+41
-1
app/assets/javascripts/ide/stores/utils.js
app/assets/javascripts/ide/stores/utils.js
+1
-1
changelogs/unreleased/64677-delete-directory-webide.yml
changelogs/unreleased/64677-delete-directory-webide.yml
+5
-0
spec/javascripts/ide/stores/utils_spec.js
spec/javascripts/ide/stores/utils_spec.js
+35
-0
No files found.
app/assets/javascripts/ide/stores/utils.js
View file @
13715f3b
...
...
@@ -129,7 +129,7 @@ export const commitActionForFile = file => {
export
const
getCommitFiles
=
stagedFiles
=>
stagedFiles
.
reduce
((
acc
,
file
)
=>
{
if
(
file
.
moved
)
return
acc
;
if
(
file
.
moved
||
file
.
type
===
'
tree
'
)
return
acc
;
return
acc
.
concat
({
...
file
,
...
...
changelogs/unreleased/64677-delete-directory-webide.yml
0 → 100644
View file @
13715f3b
---
title
:
Fixed removing directories in Web IDE
merge_request
:
31727
author
:
type
:
fixed
spec/javascripts/ide/stores/utils_spec.js
View file @
13715f3b
...
...
@@ -261,6 +261,41 @@ describe('Multi-file store utils', () => {
},
]);
});
it
(
'
filters out folders from the list
'
,
()
=>
{
const
files
=
[
{
path
:
'
a
'
,
type
:
'
blob
'
,
deleted
:
true
,
},
{
path
:
'
c
'
,
type
:
'
tree
'
,
deleted
:
true
,
},
{
path
:
'
c/d
'
,
type
:
'
blob
'
,
deleted
:
true
,
},
];
const
flattendFiles
=
utils
.
getCommitFiles
(
files
);
expect
(
flattendFiles
).
toEqual
([
{
path
:
'
a
'
,
type
:
'
blob
'
,
deleted
:
true
,
},
{
path
:
'
c/d
'
,
type
:
'
blob
'
,
deleted
:
true
,
},
]);
});
});
describe
(
'
mergeTrees
'
,
()
=>
{
...
...
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