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:
authorPhil Hughes <me@iamphill.com>2018-06-07 19:19:35 +0300
committerPhil Hughes <me@iamphill.com>2018-06-15 13:18:48 +0300
commite906be2f683f6170a5ee1d5b5f104ab0e08062d1 (patch)
tree64f388c2f43fd7710456fbc1fdd688f64c8af64e /app/assets/javascripts/ide/stores/utils.js
parentf39582f7b8cc9f1fdb74b58eece944110fc0a625 (diff)
IDE sends last commit ID when committing changes
Closes #46192
Diffstat (limited to 'app/assets/javascripts/ide/stores/utils.js')
-rw-r--r--app/assets/javascripts/ide/stores/utils.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/stores/utils.js b/app/assets/javascripts/ide/stores/utils.js
index a04a33cd12d..15305684aed 100644
--- a/app/assets/javascripts/ide/stores/utils.js
+++ b/app/assets/javascripts/ide/stores/utils.js
@@ -104,7 +104,7 @@ export const setPageTitle = title => {
document.title = title;
};
-export const createCommitPayload = (branch, newBranch, state, rootState) => ({
+export const createCommitPayload = ({ branch, newBranch, state, rootState }) => ({
branch,
commit_message: state.commitMessage,
actions: rootState.stagedFiles.map(f => ({
@@ -112,6 +112,7 @@ export const createCommitPayload = (branch, newBranch, state, rootState) => ({
file_path: f.path,
content: f.content,
encoding: f.base64 ? 'base64' : 'text',
+ last_commit_id: newBranch ? undefined : f.lastCommit.id,
})),
start_branch: newBranch ? rootState.currentBranchId : undefined,
});