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
Boxiang Sun
gitlab-ce
Commits
faaed0aa
Commit
faaed0aa
authored
Aug 17, 2017
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete unused Gitlab::Git methods
parent
66afd1ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
37 deletions
+0
-37
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+0
-20
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+0
-17
No files found.
lib/gitlab/git/repository.rb
View file @
faaed0aa
...
@@ -64,7 +64,6 @@ module Gitlab
...
@@ -64,7 +64,6 @@ module Gitlab
end
end
delegate
:empty?
,
delegate
:empty?
,
:bare?
,
to: :rugged
to: :rugged
delegate
:exists?
,
to: :gitaly_repository_client
delegate
:exists?
,
to: :gitaly_repository_client
...
@@ -233,10 +232,6 @@ module Gitlab
...
@@ -233,10 +232,6 @@ module Gitlab
branch_names
+
tag_names
branch_names
+
tag_names
end
end
def
has_commits?
!
empty?
end
# Discovers the default branch based on the repository's available branches
# Discovers the default branch based on the repository's available branches
#
#
# - If no branches are present, returns nil
# - If no branches are present, returns nil
...
@@ -594,11 +589,6 @@ module Gitlab
...
@@ -594,11 +589,6 @@ module Gitlab
raise
InvalidRef
.
new
(
"Invalid reference
#{
start_point
}
"
)
raise
InvalidRef
.
new
(
"Invalid reference
#{
start_point
}
"
)
end
end
# Return an array of this repository's remote names
def
remote_names
rugged
.
remotes
.
each_name
.
to_a
end
# Delete the specified remote from this repository.
# Delete the specified remote from this repository.
def
remote_delete
(
remote_name
)
def
remote_delete
(
remote_name
)
rugged
.
remotes
.
delete
(
remote_name
)
rugged
.
remotes
.
delete
(
remote_name
)
...
@@ -618,16 +608,6 @@ module Gitlab
...
@@ -618,16 +608,6 @@ module Gitlab
rugged
.
remotes
.
set_url
(
remote_name
,
options
[
:url
])
if
options
[
:url
]
rugged
.
remotes
.
set_url
(
remote_name
,
options
[
:url
])
if
options
[
:url
]
end
end
# Fetch the specified remote
def
fetch
(
remote_name
)
rugged
.
remotes
[
remote_name
].
fetch
end
# Push +*refspecs+ to the remote identified by +remote_name+.
def
push
(
remote_name
,
*
refspecs
)
rugged
.
remotes
[
remote_name
].
push
(
refspecs
)
end
AUTOCRLF_VALUES
=
{
AUTOCRLF_VALUES
=
{
"true"
=>
true
,
"true"
=>
true
,
"false"
=>
false
,
"false"
=>
false
,
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
faaed0aa
...
@@ -235,18 +235,10 @@ describe Gitlab::Git::Repository, seed_helper: true do
...
@@ -235,18 +235,10 @@ describe Gitlab::Git::Repository, seed_helper: true do
it
{
is_expected
.
to
be
<
2
}
it
{
is_expected
.
to
be
<
2
}
end
end
describe
'#has_commits?'
do
it
{
expect
(
repository
.
has_commits?
).
to
be_truthy
}
end
describe
'#empty?'
do
describe
'#empty?'
do
it
{
expect
(
repository
.
empty?
).
to
be_falsey
}
it
{
expect
(
repository
.
empty?
).
to
be_falsey
}
end
end
describe
'#bare?'
do
it
{
expect
(
repository
.
bare?
).
to
be_truthy
}
end
describe
'#ref_names'
do
describe
'#ref_names'
do
let
(
:ref_names
)
{
repository
.
ref_names
}
let
(
:ref_names
)
{
repository
.
ref_names
}
subject
{
ref_names
}
subject
{
ref_names
}
...
@@ -441,15 +433,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
...
@@ -441,15 +433,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
end
end
end
describe
"#remote_names"
do
let
(
:remotes
)
{
repository
.
remote_names
}
it
"should have one entry: 'origin'"
do
expect
(
remotes
.
size
).
to
eq
(
1
)
expect
(
remotes
.
first
).
to
eq
(
"origin"
)
end
end
describe
"#refs_hash"
do
describe
"#refs_hash"
do
let
(
:refs
)
{
repository
.
refs_hash
}
let
(
:refs
)
{
repository
.
refs_hash
}
...
...
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