removed un-used code

fixed folder deletions not adding to changedFiles
This commit is contained in:
Phil Hughes 2018-08-02 11:01:25 +01:00
parent 6112d8922c
commit 3d5f8fb5e8
No known key found for this signature in database
GPG key ID: 32245528C52E0F9F
2 changed files with 2 additions and 7 deletions

View file

@ -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);

View file

@ -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,
});
}, []);