diff options
| author | Shulhan <ms@kilabit.info> | 2024-01-24 02:14:06 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-01-24 02:14:06 +0700 |
| commit | b8a84637a476a05097d98a87e5c6af59b0d3e413 (patch) | |
| tree | 42d86321dacc06ee099017abd1c9cb8143ddd673 | |
| parent | 3aa74ae36f5c4299b185aae68890d75db8633ccc (diff) | |
| download | pakakeh.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.sh | 2 |
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) |
