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
9bb4cd75
Commit
9bb4cd75
authored
Jan 26, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use commit rather than branch, and rename to avoid confusion
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_21626953
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_21626952
parent
acda0cd4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
repository.rb
app/models/repository.rb
+8
-8
No files found.
app/models/repository.rb
View file @
9bb4cd75
...
...
@@ -996,10 +996,10 @@ class Repository
end
end
def
check_revert_content
(
commit
,
branch_name
)
source_sha
=
find_branch
(
branch_name
).
dereferenced_target
.
sha
args
=
[
commit
.
id
,
source_sha
]
args
<<
{
mainline:
1
}
if
commit
.
merge_commit?
def
check_revert_content
(
target_
commit
,
branch_name
)
source_sha
=
commit
(
branch_name
)
.
sha
args
=
[
target_commit
.
sha
,
source_sha
]
args
<<
{
mainline:
1
}
if
target_
commit
.
merge_commit?
revert_index
=
rugged
.
revert_commit
(
*
args
)
return
false
if
revert_index
.
conflicts?
...
...
@@ -1010,10 +1010,10 @@ class Repository
tree_id
end
def
check_cherry_pick_content
(
commit
,
branch_name
)
source_sha
=
find_branch
(
branch_name
).
dereferenced_target
.
sha
args
=
[
commit
.
id
,
source_sha
]
args
<<
1
if
commit
.
merge_commit?
def
check_cherry_pick_content
(
target_
commit
,
branch_name
)
source_sha
=
commit
(
branch_name
)
.
sha
args
=
[
target_commit
.
sha
,
source_sha
]
args
<<
1
if
target_
commit
.
merge_commit?
cherry_pick_index
=
rugged
.
cherrypick_commit
(
*
args
)
return
false
if
cherry_pick_index
.
conflicts?
...
...
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