aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/admin_general_controller.rb2
-rw-r--r--app/controllers/application_controller.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb
index 9f4c398c1..96b67d389 100644
--- a/app/controllers/admin_general_controller.rb
+++ b/app/controllers/admin_general_controller.rb
@@ -121,7 +121,7 @@ class AdminGeneralController < AdminController
def debug
@admin_current_user = admin_current_user
- @current_commit = `git log -1 --format="%H"`
+ @current_commit = alaveteli_git_commit
@current_branch = `git branch | perl -ne 'print $1 if /^\\* (.*)/'`
@current_version = `git describe --always --tags`
repo = `git remote show origin -n | perl -ne 'print $1 if m{Fetch URL: .*github\\.com[:/](.*)\\.git}'`
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index f3deeb64a..f5d6cbf18 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -562,6 +562,11 @@ class ApplicationController < ActionController::Base
def set_popup_banner
@popup_banner = render_to_string(:partial => "general/popup_banner").strip.html_safe
end
+
+ def alaveteli_git_commit
+ `git log -1 --format="%H"`.strip
+ end
+
# URL generating functions are needed by all controllers (for redirects),
# views (for links) and mailers (for use in emails), so include them into
# all of all.