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.
This commit is contained in:
spacewander 2015-04-24 23:13:16 +08:00
parent 3055a664f9
commit b4a1fe0aa3

View file

@ -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