diff options
author | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-02-05 12:46:31 +0900 |
---|---|---|
committer | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-02-05 19:08:09 +0900 |
commit | 8ff5cf9cd5193b7135f53de3b62dd50bcbbfc2dc (patch) | |
tree | b28ca30035b43c4294dc58bb3ec0a5980e948f8e /app/controllers/graph_controller.rb | |
parent | 81cc1cb87b2056b11640c9887bd40674c9d7925e (diff) | |
download | gitlab-ce-8ff5cf9cd5193b7135f53de3b62dd50bcbbfc2dc.tar.gz |
Add search box for the commit.
Diffstat (limited to 'app/controllers/graph_controller.rb')
-rw-r--r-- | app/controllers/graph_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/graph_controller.rb b/app/controllers/graph_controller.rb index c4d745e9ccd..c370433e500 100644 --- a/app/controllers/graph_controller.rb +++ b/app/controllers/graph_controller.rb @@ -7,6 +7,16 @@ class GraphController < ProjectResourceController before_filter :require_non_empty_project def show + if params.has_key?(:q) && params[:q].blank? + redirect_to project_graph_path(@project, params[:id]) + return + end + + if params.has_key?(:q) + @q = params[:q] + @commit = @project.repository.commit(@q) || @commit + end + respond_to do |format| format.html format.json do |