fix(updater): follow first-parent history for cooldown

This commit is contained in:
Robby Russell
2026-09-08 16:21:10 -07:00
parent e872c661ad
commit d65cdc7d37
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ function is_update_available() {
(builtin cd -q "$ZSH"; LANG= git fetch --quiet $remote $branch) || return 1
zmodload zsh/datetime
cutoff_epoch=$(( EPOCHSECONDS - cooldown_days * 86400 ))
cooldown_ref=$(builtin cd -q "$ZSH"; git log --format="%H %ct" FETCH_HEAD \
cooldown_ref=$(builtin cd -q "$ZSH"; git log --first-parent --format="%H %ct" FETCH_HEAD \
| awk -v c="$cutoff_epoch" '$2 <= c { print $1; exit }')
[[ -n "$cooldown_ref" ]] || return 1
[[ "$cooldown_ref" != "$local_head" ]] || return 1
+1 -1
View File
@@ -248,7 +248,7 @@ update_with_cooldown() {
cutoff_epoch=$(( EPOCHSECONDS - cooldown_days * 86400 ))
LANG= git fetch --quiet $remote $branch || return $?
cooldown_ref=$(git log --format="%H %ct" FETCH_HEAD \
cooldown_ref=$(git log --first-parent --format="%H %ct" FETCH_HEAD \
| awk -v c="$cutoff_epoch" '$2 <= c { print $1; exit }')
[[ -n "$cooldown_ref" ]] || return 0