summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorHiroyuki Sato <h-sato@ruby-dev.jp>2016-10-28 20:38:14 +0900
committerHiroyuki Sato <h-sato@ruby-dev.jp>2016-11-06 12:05:13 +0900
commit56264f35d40e3ebcebf2b88b9ff6f3a8f4f545e9 (patch)
tree5ba7c48578b118e2b00ebfa1489f9f39acb87518 /app/controllers
parentc392b0cc24ba40e3fed920c6c693cb24665193af (diff)
downloadgitlab-ce-56264f35d40e3ebcebf2b88b9ff6f3a8f4f545e9.tar.gz
Network page appear with an error message when entering nonexistent git revision
Diffstat (limited to 'app/controllers')
-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])