Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroyuki Sato <h-sato@ruby-dev.jp>2016-10-28 14:38:14 +0300
committerHiroyuki Sato <h-sato@ruby-dev.jp>2016-11-06 06:05:13 +0300
commit56264f35d40e3ebcebf2b88b9ff6f3a8f4f545e9 (patch)
tree5ba7c48578b118e2b00ebfa1489f9f39acb87518 /app/controllers/projects/network_controller.rb
parentc392b0cc24ba40e3fed920c6c693cb24665193af (diff)
Network page appear with an error message when entering nonexistent git revision
Diffstat (limited to 'app/controllers/projects/network_controller.rb')
-rw-r--r--app/controllers/projects/network_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects/network_controller.rb b/app/controllers/projects/network_controller.rb
index 34318391dd9..54783bbc5bb 100644
--- a/app/controllers/projects/network_controller.rb
+++ b/app/controllers/projects/network_controller.rb
@@ -11,7 +11,9 @@ class Projects::NetworkController < Projects::ApplicationController
@commit_url = namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")
respond_to do |format|
- format.html
+ format.html do
+ flash.now[:alert] = "Git revision '#{params[:extended_sha1]}' does not exist." if params[:extended_sha1].present? && !@commit
+ end
format.json do
@graph = Network::Graph.new(project, @ref, @commit, @options[:filter_ref])