Verified Commit 8a9afbc6 authored by Duncan Macleod's avatar Duncan Macleod
Browse files

gnuscripts: fix corner case git log issue

if the user has `log.showsignature=true` in their git config (like I do) then `git log -1 --pretty=format` still includes the gpg signature output, so we need to forcibly not show signatures when we actually want one-liner output
parent 9e4b757b
......@@ -66,10 +66,11 @@ source="${3?"input_file not set"}"
srcdir="`dirname "$source"`"
# use git log to get the important fields
git_id="`cd "$srcdir" && $git_path log -1 --pretty=format:%H`"
git_date="`cd "$srcdir" && env LC_TIME=C TZ=GMT0 $git_path log -1 --date=local --pretty=format:%cd`"
git_author="`cd "$srcdir" && $git_path log -1 --pretty=format:"%an <%ae>"`"
git_committer="`cd "$srcdir" && $git_path log -1 --pretty=format:"%cn <%ce>"`"
git_log_cmd="${git_path} log -1 --no-show-signature"
git_id="`cd "$srcdir" && ${git_log_cmd} --pretty=format:%H`"
git_date="`cd "$srcdir" && env LC_TIME=C TZ=GMT0 ${git_log_cmd} --date=local --pretty=format:%cd`"
git_author="`cd "$srcdir" && ${git_log_cmd} --pretty=format:"%an <%ae>"`"
git_committer="`cd "$srcdir" && ${git_log_cmd} --pretty=format:"%cn <%ce>"`"
# extract relevant fields of %c date format
git_date_mon=`echo "$git_date" | cut -d " " -f2`
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment