summaryrefslogtreecommitdiff
path: root/app/helpers/git_helper.rb
diff options
context:
space:
mode:
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..8ab394384f3 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)
+ Commit.truncate_sha(text)
+ end
end