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/utils.js')
-rw-r--r--app/assets/javascripts/ide/stores/utils.js17
1 files changed, 0 insertions, 17 deletions
diff --git a/app/assets/javascripts/ide/stores/utils.js b/app/assets/javascripts/ide/stores/utils.js
index f074e6880d0..d9cdc7727ad 100644
--- a/app/assets/javascripts/ide/stores/utils.js
+++ b/app/assets/javascripts/ide/stores/utils.js
@@ -12,10 +12,7 @@ export const dataStructure = () => ({
// it can also contain a prefix `pending-` for files opened in review mode
key: '',
type: '',
- projectId: '',
- branchId: '',
name: '',
- url: '',
path: '',
tempFile: false,
tree: [],
@@ -26,7 +23,6 @@ export const dataStructure = () => ({
staged: false,
lastCommitSha: '',
rawPath: '',
- binary: false,
raw: '',
content: '',
editorRow: 1,
@@ -44,10 +40,7 @@ export const dataStructure = () => ({
export const decorateData = entity => {
const {
id,
- projectId,
- branchId,
type,
- url,
name,
path,
content = '',
@@ -55,7 +48,6 @@ export const decorateData = entity => {
active = false,
opened = false,
changed = false,
- binary = false,
rawPath = '',
file_lock,
parentPath = '',
@@ -63,19 +55,15 @@ export const decorateData = entity => {
return Object.assign(dataStructure(), {
id,
- projectId,
- branchId,
key: `${name}-${type}-${id}`,
type,
name,
- url,
path,
tempFile,
opened,
active,
changed,
content,
- binary,
rawPath,
file_lock,
parentPath,
@@ -189,11 +177,6 @@ export const mergeTrees = (fromTree, toTree) => {
return toTree;
};
-export const replaceFileUrl = (url, oldPath, newPath) => {
- // Add `/-/` so that we don't accidentally replace project path
- return url.replace(`/-/${oldPath}`, `/-/${newPath}`);
-};
-
export const swapInStateArray = (state, arr, key, entryPath) =>
Object.assign(state, {
[arr]: state[arr].map(f => (f.key === key ? state.entries[entryPath] : f)),