Skip to content
Snippets Groups Projects

CE upstream

Merged Valery Sizov requested to merge ce_upstream into master
2 files
+ 11
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -5,16 +5,16 @@ class Projects::NetworkController < Projects::ApplicationController
before_action :require_non_empty_project
before_action :assign_ref_vars
before_action :authorize_download_code!
before_action :assign_extended_sha1
def show
@url = namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json))
@commit_url = namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")
@commit = @repo.commit(params[:extended_sha1]) if params[:extended_sha1].present?
respond_to do |format|
format.html do
if params[:extended_sha1].present? && !@commit
flash.now[:alert] = "Git revision '#{params[:extended_sha1]}' does not exist."
if @options[:extended_sha1] && !@commit
flash.now[:alert] = "Git revision '#{@options[:extended_sha1]}' does not exist."
end
end
@@ -23,4 +23,11 @@ def show
end
end
end
def assign_extended_sha1
return if params[:extended_sha1].blank?
@options[:extended_sha1] = params[:extended_sha1]
@commit = @repo.commit(@options[:extended_sha1])
end
end
Loading