diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-04 18:06:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-04 18:06:38 +0300 |
commit | 5ecacec30458330df5fa6d591dc58e37afb41cd4 (patch) | |
tree | 58a9c004fdae78cbedbcc616dcfa783a1172eea3 /app/assets/javascripts/ide/stores/mutations/file.js | |
parent | 0d46bf06388d485824bc2f1e736b92b2a8a397e4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ide/stores/mutations/file.js')
-rw-r--r-- | app/assets/javascripts/ide/stores/mutations/file.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/app/assets/javascripts/ide/stores/mutations/file.js b/app/assets/javascripts/ide/stores/mutations/file.js index 1442ea7dbfa..8caeb2d73b2 100644 --- a/app/assets/javascripts/ide/stores/mutations/file.js +++ b/app/assets/javascripts/ide/stores/mutations/file.js @@ -138,8 +138,6 @@ export default { content: stagedFile ? stagedFile.content : state.entries[path].raw, changed: false, deleted: false, - moved: false, - movedPath: '', }); if (deleted) { @@ -179,11 +177,6 @@ export default { }); if (stagedFile) { - Object.assign(state, { - replacedFiles: state.replacedFiles.concat({ - ...stagedFile, - }), - }); Object.assign(stagedFile, { ...state.entries[path], }); @@ -252,4 +245,15 @@ export default { openFiles: state.openFiles.filter(f => f.key !== file.key), }); }, + [types.REMOVE_FILE_FROM_STAGED_AND_CHANGED](state, file) { + Object.assign(state, { + changedFiles: state.changedFiles.filter(f => f.key !== file.key), + stagedFiles: state.stagedFiles.filter(f => f.key !== file.key), + }); + + Object.assign(state.entries[file.path], { + changed: false, + staged: false, + }); + }, }; |