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
38a02976
Commit
38a02976
authored
Feb 25, 2020
by
Phil Hughes
Committed by
Stan Hu
Feb 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GraphQL tree query erroring when using tags
parent
22d65400
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
lib/gitlab/git/rugged_impl/repository.rb
lib/gitlab/git/rugged_impl/repository.rb
+1
-1
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+8
-1
No files found.
lib/gitlab/git/rugged_impl/repository.rb
View file @
38a02976
...
@@ -70,7 +70,7 @@ module Gitlab
...
@@ -70,7 +70,7 @@ module Gitlab
# Lookup for rugged object by oid or ref name
# Lookup for rugged object by oid or ref name
def
lookup
(
oid_or_ref_name
)
def
lookup
(
oid_or_ref_name
)
r
ugged
.
rev_parse
(
oid_or_ref_name
)
r
ev_parse_target
(
oid_or_ref_name
)
end
end
end
end
end
end
...
...
spec/models/repository_spec.rb
View file @
38a02976
...
@@ -2381,7 +2381,7 @@ describe Repository do
...
@@ -2381,7 +2381,7 @@ describe Repository do
end
end
end
end
describe
'#tree'
do
shared_examples
'#tree'
do
context
'using a non-existing repository'
do
context
'using a non-existing repository'
do
before
do
before
do
allow
(
repository
).
to
receive
(
:head_commit
).
and_return
(
nil
)
allow
(
repository
).
to
receive
(
:head_commit
).
and_return
(
nil
)
...
@@ -2399,10 +2399,17 @@ describe Repository do
...
@@ -2399,10 +2399,17 @@ describe Repository do
context
'using an existing repository'
do
context
'using an existing repository'
do
it
'returns a Tree'
do
it
'returns a Tree'
do
expect
(
repository
.
tree
(
:head
)).
to
be_an_instance_of
(
Tree
)
expect
(
repository
.
tree
(
:head
)).
to
be_an_instance_of
(
Tree
)
expect
(
repository
.
tree
(
'v1.1.1'
)).
to
be_an_instance_of
(
Tree
)
end
end
end
end
end
end
it_behaves_like
'#tree'
describe
'#tree? with Rugged enabled'
,
:enable_rugged
do
it_behaves_like
'#tree'
end
describe
'#size'
do
describe
'#size'
do
context
'with a non-existing repository'
do
context
'with a non-existing repository'
do
it
'returns 0'
do
it
'returns 0'
do
...
...
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