Improve stdout of zerotime hook

main
Adrian Alic 11 months ago
parent 1206a62819
commit e3f1d8ab45

@ -17,11 +17,20 @@
# Zero the hours, minutes and seconds of the current time
DATE=$(date --iso-8601=seconds | sed 's/T.*+/T00:00:00+/g')
# Disable warning
git config advice.ignoredHook false
# Disable post commit hook
chmod -x .git/hooks/post-commit
# Replace the commit date with the zeroed time
git commit --no-verify --amend --date="$DATE" --no-edit
git commit --no-verify --amend --date="$DATE" --no-edit > /dev/null
# Enable post-commit hook
chmod +x .git/hooks/post-commit
# Enable warning
git config advice.ignoredHook true
# Enumerate hooks
echo "[x] post-commit: zerotime"

Loading…
Cancel
Save