Set hash length to 7

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2016-12-27 21:37:05 +01:00
parent b53a17a04d
commit bf84e376d2
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -96,7 +96,7 @@ def blame(filename)
content.split(/(?<=^[a-f0-9]{40})/).each_with_index do |line, line_number|
if line_number == 0
@hash = line.split("\n").last.truncate(12)
@hash = line.split("\n").last.truncate(7)
end
next if line_number == 0
@ -120,7 +120,7 @@ def blame(filename)
output << "%s %s\t%-4s %s\n" % [@hash.colorize(Authors[author].getColor()), Authors[author].initials, line_number, code]
@hash = line.split("\n").last.truncate(12)
@hash = line.split("\n").last.truncate(7)
end
output << "\n"