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
85aeb884
Commit
85aeb884
authored
Aug 15, 2017
by
Saverio Miroddi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for start project to commit cherry-pick description
parent
e33608d8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
commit.rb
app/models/commit.rb
+4
-4
repository.rb
app/models/repository.rb
+1
-1
No files found.
app/models/commit.rb
View file @
85aeb884
...
...
@@ -251,11 +251,11 @@ class Commit
project
.
repository
.
next_branch
(
"cherry-pick-
#{
short_id
}
"
,
mild:
true
)
end
def
cherry_pick_description
(
start_branch_name
)
def
cherry_pick_description
(
start_
project
,
start_
branch_name
)
message_buffer
=
"(cherry picked from commit
#{
sha
}
)"
if
merge_commit?
compare
=
CompareService
.
new
(
project
,
sha
).
execute
(
project
,
start_branch_name
)
compare
=
CompareService
.
new
(
project
,
sha
).
execute
(
start_
project
,
start_branch_name
)
# Ignore the merge commit.
commits_in_merge
=
compare
.
commits
[
0
..-
2
]
...
...
@@ -272,8 +272,8 @@ class Commit
message_buffer
end
def
cherry_pick_message
(
start_branch_name
)
%Q{
#{
message
}
\n\n
#{
cherry_pick_description
(
start_branch_name
)
}
}
def
cherry_pick_message
(
start_
project
,
start_
branch_name
)
%Q{
#{
message
}
\n\n
#{
cherry_pick_description
(
start_
project
,
start_
branch_name
)
}
}
end
def
revert_description
(
user
)
...
...
app/models/repository.rb
View file @
85aeb884
...
...
@@ -879,7 +879,7 @@ class Repository
committer
=
user_to_committer
(
user
)
commit_message
=
commit
.
cherry_pick_message
(
start_branch_name
)
commit_message
=
commit
.
cherry_pick_message
(
start_
project
,
start_
branch_name
)
create_commit
(
message:
commit_message
,
author:
{
...
...
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