diff options
author | Sean McGivern <sean@gitlab.com> | 2019-04-11 07:45:48 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-04-11 07:45:48 +0000 |
commit | dd019c2e0b6e292fb55ed264c430eec4a13c0c6b (patch) | |
tree | 285b17b0b62aab22f71e4661e88dfda083de4040 /spec | |
parent | cd770031736419c142990d7474a98b835ac97a92 (diff) | |
parent | 674b926ef4dd48146be7fa8a8c37861b285bbe3b (diff) | |
download | gitlab-ce-dd019c2e0b6e292fb55ed264c430eec4a13c0c6b.tar.gz |
Merge branch 'jc-guard-against-empty-dereferenced_target' into 'master'
Guard against nil dereferenced_target
Closes #60076
See merge request gitlab-org/gitlab-ce!27192
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/git/repository_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb index fdb43d1221a..778950c95e4 100644 --- a/spec/lib/gitlab/git/repository_spec.rb +++ b/spec/lib/gitlab/git/repository_spec.rb @@ -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 |