mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
git-summary: protect against character encoding issues with LC_ALL=C
This commit is contained in:
parent
faaae9fa6b
commit
19f66943cb
|
|
@ -9,7 +9,7 @@ single_file() {
|
|||
while read data
|
||||
do
|
||||
if [[ $(file "$data") = *text* ]]; then
|
||||
git blame --line-porcelain "$data" 2>/dev/null | grep "^author\ " | sed -n 's/^author //p';
|
||||
git blame --line-porcelain "$data" 2>/dev/null | grep "^author\ " | LC_ALL=C sed -n 's/^author //p';
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
SUBDIRECTORY_OK=Yes
|
||||
source "$(git --exec-path)/git-sh-setup"
|
||||
cd_to_toplevel
|
||||
|
|
@ -63,7 +64,7 @@ authors() {
|
|||
#
|
||||
|
||||
repository_age() {
|
||||
git log --reverse --pretty=oneline --format="%ar" | head -n 1 | sed 's/ago//'
|
||||
git log --reverse --pretty=oneline --format="%ar" | head -n 1 | LC_ALL=C sed 's/ago//'
|
||||
}
|
||||
|
||||
# summary
|
||||
|
|
|
|||
Loading…
Reference in a new issue