Commit 2274b920 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch '296912-rename-webide-bug' into 'master'

Fix Web IDE renaming empty content

See merge request gitlab-org/gitlab!71130
parents 0be786d5 04340139
......@@ -117,7 +117,7 @@ export const createCommitPayload = ({
action: commitActionForFile(f),
file_path: f.path,
previous_path: f.prevPath || undefined,
content: f.prevPath && !f.changed ? null : content || undefined,
content: content || undefined,
encoding: isBlob ? 'base64' : 'text',
last_commit_id: newBranch || f.deleted || f.prevPath ? undefined : f.lastCommitSha,
};
......
......@@ -94,7 +94,7 @@ describe('Multi-file store utils', () => {
{
action: commitActionTypes.move,
file_path: 'renamedFile',
content: null,
content: undefined,
encoding: 'text',
last_commit_id: undefined,
previous_path: 'prevPath',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment