summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/modules/commit/actions.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-22 11:31:16 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-22 11:31:16 +0000
commit905c1110b08f93a19661cf42a276c7ea90d0a0ff (patch)
tree756d138db422392c00471ab06acdff92c5a9b69c /app/assets/javascripts/ide/stores/modules/commit/actions.js
parent50d93f8d1686950fc58dda4823c4835fd0d8c14b (diff)
downloadgitlab-ce-905c1110b08f93a19661cf42a276c7ea90d0a0ff.tar.gz
Add latest changes from gitlab-org/gitlab@12-4-stable-ee
Diffstat (limited to 'app/assets/javascripts/ide/stores/modules/commit/actions.js')
-rw-r--r--app/assets/javascripts/ide/stores/modules/commit/actions.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/app/assets/javascripts/ide/stores/modules/commit/actions.js b/app/assets/javascripts/ide/stores/modules/commit/actions.js
index 23caf2d48ed..e89ed49318b 100644
--- a/app/assets/javascripts/ide/stores/modules/commit/actions.js
+++ b/app/assets/javascripts/ide/stores/modules/commit/actions.js
@@ -152,6 +152,12 @@ export const commitChanges = ({ commit, state, getters, dispatch, rootState, roo
branch: getters.branchName,
})
.then(() => {
+ commit(rootTypes.CLEAR_STAGED_CHANGES, null, { root: true });
+
+ setTimeout(() => {
+ commit(rootTypes.SET_LAST_COMMIT_MSG, '', { root: true });
+ }, 5000);
+
if (state.shouldCreateMR) {
const { currentProject } = rootGetters;
const targetBranch = getters.isCreatingNewBranch
@@ -164,14 +170,6 @@ export const commitChanges = ({ commit, state, getters, dispatch, rootState, roo
{ root: true },
);
}
-
- commit(rootTypes.CLEAR_STAGED_CHANGES, null, { root: true });
-
- commit(rootTypes.CLEAR_REPLACED_FILES, null, { root: true });
-
- setTimeout(() => {
- commit(rootTypes.SET_LAST_COMMIT_MSG, '', { root: true });
- }, 5000);
})
.then(() => {
if (rootGetters.lastOpenedFile) {