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
Léo-Paul Géneau
gitlab-ce
Commits
9ec358af
Commit
9ec358af
authored
Aug 21, 2017
by
Saverio Miroddi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverse order of commits in MR cherry-pick message
Also improved the UT for better documenting this change.
parent
b4622c77
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/models/commit.rb
app/models/commit.rb
+1
-1
spec/models/commit_spec.rb
spec/models/commit_spec.rb
+3
-2
No files found.
app/models/commit.rb
View file @
9ec358af
...
@@ -260,7 +260,7 @@ class Commit
...
@@ -260,7 +260,7 @@ class Commit
if
commits_in_merge_request
.
present?
if
commits_in_merge_request
.
present?
message_buffer
<<
"
\n
"
message_buffer
<<
"
\n
"
commits_in_merge_request
.
each
do
|
commit_in_merge
|
commits_in_merge_request
.
reverse
.
each
do
|
commit_in_merge
|
message_buffer
<<
"
\n
#{
commit_in_merge
.
short_id
}
#{
commit_in_merge
.
title
}
"
message_buffer
<<
"
\n
#{
commit_in_merge
.
short_id
}
#{
commit_in_merge
.
title
}
"
end
end
end
end
...
...
spec/models/commit_spec.rb
View file @
9ec358af
...
@@ -214,7 +214,7 @@ eos
...
@@ -214,7 +214,7 @@ eos
let
(
:merge_commit
)
do
let
(
:merge_commit
)
do
merge_request
=
create
(
:merge_request
,
merge_request
=
create
(
:merge_request
,
source_branch:
'
feature
'
,
source_branch:
'
video
'
,
target_branch:
'master'
,
target_branch:
'master'
,
source_project:
project
,
source_project:
project
,
author:
user
)
author:
user
)
...
@@ -238,7 +238,8 @@ eos
...
@@ -238,7 +238,8 @@ eos
(cherry picked from commit
#{
merge_commit
.
sha
}
)
(cherry picked from commit
#{
merge_commit
.
sha
}
)
0b4bc9a4 Feature added
467dc98f Add new 'videos' directory
88790590 Upload new video file
STR
STR
expect
(
merge_commit
.
cherry_pick_message
(
user
)).
to
include
(
expected_appended_text
)
expect
(
merge_commit
.
cherry_pick_message
(
user
)).
to
include
(
expected_appended_text
)
...
...
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