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
d4a89c3d
Commit
d4a89c3d
authored
Apr 11, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
89fe979b
dd019c2e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
changelogs/unreleased/jc-guard-against-empty-dereferenced_target.yml
...unreleased/jc-guard-against-empty-dereferenced_target.yml
+5
-0
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+1
-1
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+7
-0
No files found.
changelogs/unreleased/jc-guard-against-empty-dereferenced_target.yml
0 → 100644
View file @
d4a89c3d
---
title
:
Guard against nil dereferenced_target
merge_request
:
27192
author
:
type
:
fixed
lib/gitlab/git/repository.rb
View file @
d4a89c3d
...
...
@@ -466,7 +466,7 @@ module Gitlab
@refs_hash
=
Hash
.
new
{
|
h
,
k
|
h
[
k
]
=
[]
}
(
tags
+
branches
).
each
do
|
ref
|
next
unless
ref
.
target
&&
ref
.
name
next
unless
ref
.
target
&&
ref
.
name
&&
ref
.
dereferenced_target
&
.
id
@refs_hash
[
ref
.
dereferenced_target
.
id
]
<<
ref
.
name
end
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
d4a89c3d
...
...
@@ -531,6 +531,13 @@ describe Gitlab::Git::Repository, :seed_helper do
it
'has valid commit ids as keys'
do
expect
(
subject
.
keys
).
to
all
(
match
(
Commit
::
COMMIT_SHA_PATTERN
)
)
end
it
'does not error when dereferenced_target is nil'
do
blob_id
=
repository
.
blob_at
(
'master'
,
'README.md'
).
id
repository_rugged
.
tags
.
create
(
"refs/tags/blob-tag"
,
blob_id
)
expect
{
subject
}.
not_to
raise_error
end
end
describe
'#fetch_repository_as_mirror'
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