Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ide/stores/mutations/file.js')
-rw-r--r--app/assets/javascripts/ide/stores/mutations/file.js18
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,
+ });
+ },
};