diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index a9d74acf6..73bfd39f5 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -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 diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 705de3f65..93df90dd7 100755 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -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