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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-09-01 15:23:39 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-09-07 10:22:57 +0300
commit96b83a58cc7f9a8c5b3fdf2396f5188029a4f280 (patch)
treed6caa07c4efda1efd01c3be2034fc67b7393f496 /app/helpers/git_helper.rb
parent8b2e065b7b878b27f0494248b3734381291a67bd (diff)
Improve merge request version switch/compare dropdown
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/git_helper.rb')
-rw-r--r--app/helpers/git_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/git_helper.rb b/app/helpers/git_helper.rb
index 09684955233..9d7982e169c 100644
--- a/app/helpers/git_helper.rb
+++ b/app/helpers/git_helper.rb
@@ -2,4 +2,8 @@ module GitHelper
def strip_gpg_signature(text)
text.gsub(/-----BEGIN PGP SIGNATURE-----(.*)-----END PGP SIGNATURE-----/m, "")
end
+
+ def short_sha(text)
+ text[0...8]
+ end
end