diff options
Diffstat (limited to '_scripts/postinfo')
-rwxr-xr-x | _scripts/postinfo | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/_scripts/postinfo b/_scripts/postinfo new file mode 100755 index 0000000..edc808b --- /dev/null +++ b/_scripts/postinfo @@ -0,0 +1,20 @@ +#!/bin/sh +export LANG=C + +file="$1" +tab="$(printf '\t')" + +git log \ + --follow \ + --ignore-all-space --diff-filter=AM \ + --date=unix --pretty=format:"%H$tab%cd$tab%an" \ + -- "$file" |\ +awk -F"$tab" ' +BEGIN { printf("git_log:\n") } +{ + printf(" - hash: \"%s\"\n", $1) + printf(" date: \"@%s\"\n", $2) + printf(" author: \"%s\"\n", $3) +} +' + |