summaryrefslogtreecommitdiff
path: root/bin/gitify
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gitify')
-rwxr-xr-xbin/gitify28
1 files changed, 25 insertions, 3 deletions
diff --git a/bin/gitify b/bin/gitify
index 2c73bcd..d655f22 100755
--- a/bin/gitify
+++ b/bin/gitify
@@ -1,4 +1,10 @@
#!/usr/bin/env bash
+# Copyright (c) 2017, 2023 Luke Shumaker <lukeshu@lukeshu.com>
+#
+# This work is free. You can redistribute it and/or modify it under
+# the terms of the Do What The Fuck You Want To Public License,
+# Version 2, as published by Sam Hocevar. See the COPYING file for
+# more details.
empty() {
[[ $(stat -c %s "$1") -eq 0 ]]
@@ -74,20 +80,36 @@ main() {
waurl="http://web.archive.org/web/$(murl2url "${listingdir##*/content-dir/}/")"
msg="$waurl"
fi
- gitdate="$(sed -r 's/(....)(..)(..)(..)(..)(..)/\1-\2-\3T\4:\5:\6/' <<<"$time")"
+
+ HACK_TZ=-0500
+ if [[ "$branch" == BETA/CVTUTF-1-4 || "$branch" == ALPHA/CVTUTF-1-5-draft ]]; then
+ HACK_TZ=-0400
+ fi
+ HACK_NAME='Luke Shumaker'
+ HACK_EMAIL='lukeshu@lukeshu.com'
+
+ gitdate="$(sed -E 's/(....)(..)(..)(..)(..)(..)/\1-\2-\3T\4:\5:\6 '"$HACK_TZ"'/' <<<"$time")"
+
git add .
+
export GIT_AUTHOR_DATE=$gitdate
+ export GIT_AUTHOR_NAME=$HACK_NAME
+ export GIT_AUTHOR_EMAIL=$HACK_EMAIL
+
export GIT_COMMITTER_DATE=$gitdate
+ export GIT_COMMITTER_NAME=$HACK_NAME
+ export GIT_COMMITTER_EMAIL=$HACK_EMAIL
+
git commit --allow-empty -m "$msg"
if [[ "$branch" != *.OLD ]]; then
lastbranch="$branch"
fi
if [[ "$branch" == PROGRAMS/CVTUTF ]] && git log -n1 --stat|grep -qF 'ExpectedOutput.txt'; then
- git filter-branch -f --parent-filter 'cat; echo " -p BETA/CVTUTF-1-3"' HEAD^..HEAD
+ FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch -f --parent-filter 'cat; echo " -p BETA/CVTUTF-1-3"' HEAD^..HEAD
git update-ref -d refs/original/refs/heads/"$branch"
fi
if [[ "$branch" == PROGRAMS/CVTUTF.OLD ]] && git log -n1 --stat|grep -qi '.*\.c\s'; then
- git filter-branch -f --parent-filter 'cat; echo " -p PROGRAMS/CVTUTF^"' HEAD^..HEAD
+ FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch -f --parent-filter 'cat; echo " -p PROGRAMS/CVTUTF^"' HEAD^..HEAD
git update-ref -d refs/original/refs/heads/"$branch"
fi
fi