removed un-used code
fixed folder deletions not adding to changedFiles
This commit is contained in:
parent
6112d8922c
commit
3d5f8fb5e8
2 changed files with 2 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
}, []);
|
||||
|
||||
|
|
Loading…
Reference in a new issue