Commit 3d5f8fb5 authored by Phil Hughes's avatar Phil Hughes

removed un-used code

fixed folder deletions not adding to changedFiles
parent 6112d892
......@@ -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,
});
}, []);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment