diff options
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r-- | lib/extracts_path.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb index f9843d503b4..53bc079296a 100644 --- a/lib/extracts_path.rb +++ b/lib/extracts_path.rb @@ -95,17 +95,17 @@ module ExtractsPath # resolved (e.g., when a user inserts an invalid path or ref). def assign_ref_vars # assign allowed options - allowed_options = ["filter_ref", "q"] + allowed_options = ["filter_ref", "extended_sha1"] @options = params.select {|key, value| allowed_options.include?(key) && !value.blank? } @options = HashWithIndifferentAccess.new(@options) @id = get_id @ref, @path = extract_ref(@id) @repo = @project.repository - if @options[:q].blank? + if @options[:extended_sha1].blank? @commit = @repo.commit(@ref) else - @commit = @repo.commit(@options[:q]) + @commit = @repo.commit(@options[:extended_sha1]) end @tree = Tree.new(@repo, @commit.id, @ref, @path) @hex_path = Digest::SHA1.hexdigest(@path) |