diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /lib/extracts_ref.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'lib/extracts_ref.rb')
-rw-r--r-- | lib/extracts_ref.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/extracts_ref.rb b/lib/extracts_ref.rb index 34511423d4a..d130a9d6f82 100644 --- a/lib/extracts_ref.rb +++ b/lib/extracts_ref.rb @@ -62,8 +62,7 @@ module ExtractsRef # # rubocop:disable Gitlab/ModuleWithInstanceVariables def assign_ref_vars - @id = get_id - @ref, @path = extract_ref(@id) + @id, @ref, @path = extract_ref_path @repo = repository_container.repository raise InvalidPathError if @ref.match?(/\s/) @@ -76,6 +75,13 @@ module ExtractsRef @tree ||= @repo.tree(@commit.id, @path) # rubocop:disable Gitlab/ModuleWithInstanceVariables end + def extract_ref_path + id = get_id + ref, path = extract_ref(id) + + [id, ref, path] + end + private def extract_raw_ref(id) |