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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
6bb08542
Commit
6bb08542
authored
Aug 28, 2018
by
Paul Slaughter
Committed by
Phil Hughes
Aug 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "It's impossible to commit twice to the same branch"
parent
a1f1460a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
20 deletions
+21
-20
app/assets/javascripts/ide/stores/mutations.js
app/assets/javascripts/ide/stores/mutations.js
+1
-7
changelogs/unreleased/50584-fix-ide-commit-twice.yml
changelogs/unreleased/50584-fix-ide-commit-twice.yml
+5
-0
spec/javascripts/ide/stores/modules/commit/actions_spec.js
spec/javascripts/ide/stores/modules/commit/actions_spec.js
+15
-13
No files found.
app/assets/javascripts/ide/stores/mutations.js
View file @
6bb08542
...
...
@@ -146,13 +146,7 @@ export default {
staged
:
false
,
prevPath
:
''
,
moved
:
false
,
lastCommit
:
Object
.
assign
(
state
.
entries
[
file
.
path
].
lastCommit
,
{
id
:
lastCommit
.
commit
.
id
,
url
:
lastCommit
.
commit_path
,
message
:
lastCommit
.
commit
.
message
,
author
:
lastCommit
.
commit
.
author_name
,
updatedAt
:
lastCommit
.
commit
.
authored_date
,
}),
lastCommitSha
:
lastCommit
.
commit
.
id
,
});
if
(
prevPath
)
{
...
...
changelogs/unreleased/50584-fix-ide-commit-twice.yml
0 → 100644
View file @
6bb08542
---
title
:
Fix Web IDE unable to commit to same file twice
merge_request
:
21372
author
:
type
:
fixed
spec/javascripts/ide/stores/modules/commit/actions_spec.js
View file @
6bb08542
...
...
@@ -184,7 +184,7 @@ describe('IDE commit module actions', () => {
branch
,
})
.
then
(()
=>
{
expect
(
f
.
lastCommit
.
message
).
toBe
(
data
.
message
);
expect
(
f
.
lastCommit
Sha
).
toBe
(
data
.
id
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
...
...
@@ -266,19 +266,21 @@ describe('IDE commit module actions', () => {
});
describe
(
'
success
'
,
()
=>
{
const
COMMIT_RESPONSE
=
{
id
:
'
123456
'
,
short_id
:
'
123
'
,
message
:
'
test message
'
,
committed_date
:
'
date
'
,
stats
:
{
additions
:
'
1
'
,
deletions
:
'
2
'
,
},
};
beforeEach
(()
=>
{
spyOn
(
service
,
'
commit
'
).
and
.
returnValue
(
Promise
.
resolve
({
data
:
{
id
:
'
123456
'
,
short_id
:
'
123
'
,
message
:
'
test message
'
,
committed_date
:
'
date
'
,
stats
:
{
additions
:
'
1
'
,
deletions
:
'
2
'
,
},
},
data
:
COMMIT_RESPONSE
,
}),
);
});
...
...
@@ -352,8 +354,8 @@ describe('IDE commit module actions', () => {
store
.
dispatch
(
'
commit/commitChanges
'
)
.
then
(()
=>
{
expect
(
store
.
state
.
entries
[
store
.
state
.
openFiles
[
0
].
path
].
lastCommit
.
message
).
toBe
(
'
test message
'
,
expect
(
store
.
state
.
entries
[
store
.
state
.
openFiles
[
0
].
path
].
lastCommit
Sha
).
toBe
(
COMMIT_RESPONSE
.
id
,
);
done
();
...
...
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