From b4a1fe0aa3ee45d71ec26fa9a5d245edf31090d1 Mon Sep 17 00:00:00 2001 From: spacewander Date: Fri, 24 Apr 2015 23:13:16 +0800 Subject: [PATCH] correct the broken regex '*text' only matches string ended with 'text'. So it matches 'ASCII text', but does not match 'ASCII text executable'. Before, `git summary --line` just counts plain text file, now we fix it. --- bin/git-line-summary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-line-summary b/bin/git-line-summary index f441ccd..43010dc 100755 --- a/bin/git-line-summary +++ b/bin/git-line-summary @@ -8,7 +8,7 @@ project=${PWD##*/} function single_file { while read data do - if [[ $(file $data) = *text ]]; then # + if [[ $(file $data) = *text* ]]; then # git blame --line-porcelain $data | sed -n 's/^author //p'; fi done