summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-21 16:33:18 +0000
committerDouwe Maan <douwe@gitlab.com>2015-12-21 16:33:18 +0000
commite209ba7002238459b56ced1f5b4a7ce8bd6e2b8b (patch)
tree6ab5932b44b4edf734d3e296109cbdfac422013f
parent058f27ad2ac6371ff12fb7245215115c1a7cc2c9 (diff)
parent75ad9fff4e1293776e077b402b7e0bfcff3391d0 (diff)
downloadgitlab-ce-e209ba7002238459b56ced1f5b4a7ce8bd6e2b8b.tar.gz
Merge branch 'git-version' into 'master'
Show git version on admin page Before ![git-version-beore](/uploads/57444ad42220c9dfe8f187b8e399227f/git-version-beore.png) After ![git-version-after](/uploads/cc1b52ae1a251c2c46d9626c040726ab/git-version-after.png) gitlab-org/gitlab-ce#4077 See merge request !2101
-rw-r--r--CHANGELOG2
-rw-r--r--app/views/admin/dashboard/index.html.haml4
-rw-r--r--lib/gitlab/git.rb4
3 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index ab8a958b019..c11ace750a9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -59,6 +59,8 @@ v 8.3.0 (unreleased)
- Do not show build status unless builds are enabled and `.gitlab-ci.yml` is present
- Persist runners registration token in database
- Fix online editor should not remove newlines at the end of the file
+ - Expose Git's version in the admin area
+
v 8.2.3
- Fix application settings cache not expiring after changes (Stan Hu)
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index 8657d2c71fe..531247e9148 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -80,6 +80,10 @@
%span.pull-right
= API::API::version
%p
+ Git
+ %span.pull-right
+ = Gitlab::Git.version
+ %p
Ruby
%span.pull-right
#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}
diff --git a/lib/gitlab/git.rb b/lib/gitlab/git.rb
index 0c350d7c675..f065cc5e9e9 100644
--- a/lib/gitlab/git.rb
+++ b/lib/gitlab/git.rb
@@ -20,6 +20,10 @@ module Gitlab
def blank_ref?(ref)
ref == BLANK_SHA
end
+
+ def version
+ Gitlab::VersionInfo.parse(Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} --version)).first)
+ end
end
end
end