Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
85ec068e
Commit
85ec068e
authored
Feb 14, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates cached editor models content
parent
ffd1fe29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
app/assets/javascripts/ide/stores/modules/commit/actions.js
app/assets/javascripts/ide/stores/modules/commit/actions.js
+13
-0
No files found.
app/assets/javascripts/ide/stores/modules/commit/actions.js
View file @
85ec068e
...
...
@@ -5,6 +5,7 @@ import router from '../../../ide_router';
import
service
from
'
../../../services
'
;
import
flash
from
'
../../../../flash
'
;
import
{
stripHtml
}
from
'
../../../../lib/utils/text_utility
'
;
import
editor
from
'
../../../lib/editor
'
;
export
const
updateCommitMessage
=
({
commit
},
message
)
=>
{
commit
(
types
.
UPDATE_COMMIT_MESSAGE
,
message
);
...
...
@@ -59,11 +60,23 @@ export const updateFilesAfterCommit = (
reference
:
data
.
id
,
},
{
root
:
true
});
const
cachedEditorModels
=
editor
.
editorInstance
.
modelManager
.
models
;
rootState
.
changedFiles
.
forEach
((
entry
)
=>
{
const
editorModel
=
cachedEditorModels
.
get
(
entry
.
path
);
commit
(
rootTypes
.
SET_LAST_COMMIT_DATA
,
{
entry
,
lastCommit
,
},
{
root
:
true
});
commit
(
rootTypes
.
SET_FILE_RAW_DATA
,
{
file
:
entry
,
raw
:
entry
.
content
,
},
{
root
:
true
});
editorModel
.
originalModel
.
setValue
(
entry
.
raw
);
editorModel
.
model
.
setValue
(
entry
.
raw
);
});
commit
(
rootTypes
.
REMOVE_ALL_CHANGES_FILES
,
null
,
{
root
:
true
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment