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
7354c9f7
Commit
7354c9f7
authored
Dec 20, 2017
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused method `remote_exists?`
parent
45031729
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
24 deletions
+0
-24
app/models/repository.rb
app/models/repository.rb
+0
-4
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+0
-5
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+0
-15
No files found.
app/models/repository.rb
View file @
7354c9f7
...
@@ -1010,10 +1010,6 @@ class Repository
...
@@ -1010,10 +1010,6 @@ class Repository
raw_repository
.
fetch_source_branch!
(
source_repository
.
raw_repository
,
source_branch
,
local_ref
)
raw_repository
.
fetch_source_branch!
(
source_repository
.
raw_repository
,
source_branch
,
local_ref
)
end
end
def
remote_exists?
(
name
)
raw_repository
.
remote_exists?
(
name
)
end
def
compare_source_branch
(
target_branch_name
,
source_repository
,
source_branch_name
,
straight
:)
def
compare_source_branch
(
target_branch_name
,
source_repository
,
source_branch_name
,
straight
:)
raw_repository
.
compare_source_branch
(
target_branch_name
,
source_repository
.
raw_repository
,
source_branch_name
,
straight:
straight
)
raw_repository
.
compare_source_branch
(
target_branch_name
,
source_repository
.
raw_repository
,
source_branch_name
,
straight:
straight
)
end
end
...
...
lib/gitlab/git/repository.rb
View file @
7354c9f7
...
@@ -940,11 +940,6 @@ module Gitlab
...
@@ -940,11 +940,6 @@ module Gitlab
false
false
end
end
# Returns true if a remote exists.
def
remote_exists?
(
name
)
rugged
.
remotes
[
name
].
present?
end
# Update the specified remote using the values in the +options+ hash
# Update the specified remote using the values in the +options+ hash
#
#
# Example
# Example
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
7354c9f7
...
@@ -701,21 +701,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
...
@@ -701,21 +701,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
end
end
end
describe
'#remote_exists?'
do
before
(
:all
)
do
@repo
=
Gitlab
::
Git
::
Repository
.
new
(
'default'
,
TEST_MUTABLE_REPO_PATH
,
''
)
@repo
.
add_remote
(
"new_remote"
,
SeedHelper
::
GITLAB_GIT_TEST_REPO_URL
)
end
it
'returns true for an existing remote'
do
expect
(
@repo
.
remote_exists?
(
'new_remote'
)).
to
eq
(
true
)
end
it
'returns false for a non-existing remote'
do
expect
(
@repo
.
remote_exists?
(
'foo'
)).
to
eq
(
false
)
end
end
describe
"#log"
do
describe
"#log"
do
let
(
:commit_with_old_name
)
do
let
(
:commit_with_old_name
)
do
Gitlab
::
Git
::
Commit
.
decorate
(
repository
,
@commit_with_old_name_id
)
Gitlab
::
Git
::
Commit
.
decorate
(
repository
,
@commit_with_old_name_id
)
...
...
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