From e20a1cde5d740fbc9f4d033786a8cd5ad7eb8b4d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 24 Apr 2020 01:43:31 +0000 Subject: Add latest changes from gitlab-org/gitlab@12-10-stable-ee --- app/assets/javascripts/ide/stores/mutations.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/assets/javascripts/ide/stores') diff --git a/app/assets/javascripts/ide/stores/mutations.js b/app/assets/javascripts/ide/stores/mutations.js index 49485f4d575..5d567d9b169 100644 --- a/app/assets/javascripts/ide/stores/mutations.js +++ b/app/assets/javascripts/ide/stores/mutations.js @@ -216,7 +216,12 @@ export default { if (entry.type === 'blob') { if (tempFile) { + // Since we only support one list of file changes, it's safe to just remove from both + // changed and staged. Otherwise, we'd need to somehow evaluate the difference between + // changed and HEAD. + // https://gitlab.com/gitlab-org/create-stage/-/issues/12669 state.changedFiles = state.changedFiles.filter(f => f.path !== path); + state.stagedFiles = state.stagedFiles.filter(f => f.path !== path); } else { state.changedFiles = state.changedFiles.concat(entry); } -- cgit v1.2.1