BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3d7febc0
Commit
3d7febc0
authored
Aug 15, 2017
by
Saverio Miroddi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extracted cherry-pick description in ::Commit
This also fixes the inconsistency between non/merge commits in the number of newlines introduced.
parent
cd80a907
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
commit.rb
app/models/commit.rb
+10
-6
No files found.
app/models/commit.rb
View file @
3d7febc0
...
...
@@ -251,15 +251,15 @@ class Commit
project
.
repository
.
next_branch
(
"cherry-pick-
#{
short_id
}
"
,
mild:
true
)
end
def
cherry_pick_message
(
start_branch_name
)
message_buffer
=
message
.
dup
def
cherry_pick_description
(
start_branch_name
)
if
merge_commit?
message_buffer
=
""
compare
=
CompareService
.
new
(
project
,
sha
).
execute
(
project
,
start_branch_name
)
*
commits_in_merge
,
merge_commit
=
compare
.
commits
message_buffer
<<
"
\n\n
cherry picked from merge
#{
merge_commit
.
sha
}
"
message_buffer
<<
"cherry picked from merge
#{
merge_commit
.
sha
}
"
if
commits_in_merge
.
present?
message_buffer
<<
"; commits:"
...
...
@@ -268,11 +268,15 @@ class Commit
message_buffer
<<
"
\n
-
#{
commit_in_merge
.
sha
}
"
end
end
message_buffer
else
message_buffer
<<
"
\n
cherry picked from commit
#{
sha
}
"
"
cherry picked from commit
#{
sha
}
"
end
end
message_buffer
def
cherry_pick_message
(
start_branch_name
)
%Q{
#{
message
}
\n\n
#{
cherry_pick_description
(
start_branch_name
)
}
}
end
def
revert_description
(
user
)
...
...
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