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
54d64ec9
Commit
54d64ec9
authored
Apr 13, 2019
by
Stan Hu
Committed by
Oswaldo Ferreira
Apr 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove source_branch_name commit check
This should already be done in Gitlab::Git:Compare.
parent
26653eb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
3 deletions
+1
-3
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+0
-2
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+1
-1
No files found.
lib/gitlab/git/repository.rb
View file @
54d64ec9
...
...
@@ -733,8 +733,6 @@ module Gitlab
def
compare_source_branch
(
target_branch_name
,
source_repository
,
source_branch_name
,
straight
:)
if
source_repository
==
self
return
unless
commit
(
source_branch_name
).
present?
return
Gitlab
::
Git
::
Compare
.
new
(
self
,
target_branch_name
,
source_branch_name
,
straight:
straight
)
end
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
54d64ec9
...
...
@@ -1980,7 +1980,7 @@ describe Gitlab::Git::Repository, :seed_helper do
it
'returns nil when source ref does not exist'
do
compare
=
repository
.
compare_source_branch
(
'master'
,
repository
,
'non-existent-branch'
,
straight:
false
)
expect
(
compare
).
to
be_nil
expect
(
compare
.
commits
).
to
be_empty
end
end
...
...
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