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
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/commit.rb
app/models/commit.rb
+4
-4
app/models/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