From bf84e376d211e4aa7c022914bd67db89655fcd33 Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Tue, 27 Dec 2016 21:37:05 +0100 Subject: [PATCH] Set hash length to 7 Signed-off-by: Juraj Oravec --- git-blame-color | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-blame-color b/git-blame-color index 054e3da..2a46db0 100755 --- a/git-blame-color +++ b/git-blame-color @@ -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"