blob: 95fe872fc7c8ee4e5708749b38222ddc7d6d6253 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
file="$1"
tab="$(printf '\t')"
history="$(git log \
--follow \
--ignore-all-space --diff-filter=AM \
--date=short --pretty=format:"%cd$tab%an" \
-- "$file")"
dates="$(echo "$history" | cut -d"$tab" -f1)"
authors="$(echo "$history" | cut -d"$tab" -f2 | sort -u)"
cat << EOF
date: $(echo "$dates" | head -n1)
date_initial: $(echo "$dates" | tail -n1)
edits: $(echo "$dates" | wc -l)
authors:
$(echo "$authors" | sed 's/^/- /')
EOF
|