Truncate submodule commit SHAs to 7 characters

This commit is contained in:
Douwe Maan 2015-12-02 14:53:20 +01:00
parent 67ff47b39c
commit e9e9f537e8

View file

@ -146,9 +146,9 @@ module DiffHelper
def submodule_link(blob, ref, repository = @repository)
tree, commit = submodule_links(blob, ref, repository)
commit_id = if commit.nil?
blob.id[0..10]
Commit.truncate_sha(blob.id)
else
link_to "#{blob.id[0..10]}", commit
link_to Commit.truncate_sha(blob.id), commit
end
[