diff options
author | winniehell <git@winniehell.de> | 2016-08-24 02:22:30 +0200 |
---|---|---|
committer | winniehell <git@winniehell.de> | 2016-08-24 12:54:16 +0200 |
commit | ddbdf4e609c70dc6ed88860b5e1e65abde69ee94 (patch) | |
tree | 824e93bbf35ee95020caeb5e316758b9aa361acb /lib/extracts_path.rb | |
parent | 75d48ae35bcdb8bfc0a6f661de32718710082856 (diff) | |
download | gitlab-ce-ddbdf4e609c70dc6ed88860b5e1e65abde69ee94.tar.gz |
Restore get_id in ExtractsPath
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r-- | lib/extracts_path.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb index a293fa2752f..a4558d157c0 100644 --- a/lib/extracts_path.rb +++ b/lib/extracts_path.rb @@ -94,9 +94,7 @@ module ExtractsPath @options = params.select {|key, value| allowed_options.include?(key) && !value.blank? } @options = HashWithIndifferentAccess.new(@options) - @id = params[:id] || params[:ref] - @id += "/" + params[:path] unless params[:path].blank? - + @id = get_id @ref, @path = extract_ref(@id) @repo = @project.repository if @options[:extended_sha1].blank? @@ -118,4 +116,13 @@ module ExtractsPath def tree @tree ||= @repo.tree(@commit.id, @path) end + + private + + # overriden in subclasses, do not remove + def get_id + id = params[:id] || params[:ref] + id += "/" + params[:path] unless params[:path].blank? + id + end end |