From 2dc5d5104eb154ceb879db473bcbb348c96b2e87 Mon Sep 17 00:00:00 2001 From: Brice Dutheil Date: Thu, 18 Jul 2019 15:37:47 +0200 Subject: [PATCH] git-guilt: protect against encoding issues with LC_ALL=C --- bin/git-guilt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/git-guilt b/bin/git-guilt index 05b1333..4a394e7 100755 --- a/bin/git-guilt +++ b/bin/git-guilt @@ -45,10 +45,10 @@ do test -n "$DEBUG" && echo "git blame $file" # $1 - since $2 - until git blame $NOT_WHITESPACE --line-porcelain "$1" -- "$file" 2> /dev/null | - sed -n "$PATTERN" | sort | uniq -c | sed 's/^\(.\)/- \1/' >> $MERGED_LOG + LC_ALL=C sed -n "$PATTERN" | sort | uniq -c | LC_ALL=C sed 's/^\(.\)/- \1/' >> $MERGED_LOG # if $2 not given, use current commit as "until" git blame $NOT_WHITESPACE --line-porcelain "${2-@}" -- "$file" 2> /dev/null | - sed -n "$PATTERN" | sort | uniq -c | sed 's/^\(.\)/+ \1/' >> $MERGED_LOG + LC_ALL=C sed -n "$PATTERN" | sort | uniq -c | LC_ALL=C sed 's/^\(.\)/+ \1/' >> $MERGED_LOG done DEBUG="$DEBUG" awk '