summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-01-24 02:14:06 +0700
committerShulhan <ms@kilabit.info>2024-01-24 02:14:06 +0700
commitb8a84637a476a05097d98a87e5c6af59b0d3e413 (patch)
tree42d86321dacc06ee099017abd1c9cb8143ddd673
parent3aa74ae36f5c4299b185aae68890d75db8633ccc (diff)
downloadpakakeh.go-b8a84637a476a05097d98a87e5c6af59b0d3e413.tar.xz
_bin/go-mod-tip: use committer timestamp instead of author timestamp
If the tip is rebased to upstream, the author timestamp is not changes, but the commit timestamp changes.
-rwxr-xr-x_bin/go-mod-tip.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/_bin/go-mod-tip.sh b/_bin/go-mod-tip.sh
index 4b4be228..b12bf923 100755
--- a/_bin/go-mod-tip.sh
+++ b/_bin/go-mod-tip.sh
@@ -13,7 +13,7 @@
## This command usually used to fix go.mod due to force commit.
MODNAME=$(go list -m)
-COMMIT_TS=$(git log -n 1 --pretty=format:'%at')
+COMMIT_TS=$(git log -n 1 --pretty=format:'%ct')
DATE=$(date -u --date="@${COMMIT_TS}" +%Y%m%d%H%M%S)
HASH=$(git log -n 1 --pretty=format:'%h' --abbrev=12)
TAG=$(git describe --abbrev=0 --tags 2>/dev/null)