Update test_harness.jl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Ian Butterworth
2025-11-23 09:32:32 -05:00
parent 2e39f09cda
commit 80da54fb1f

View File

@@ -28,8 +28,8 @@ if haskey(ENV, "GITHUB_SHA") && get(ENV, "GITHUB_EVENT_NAME", "") == "pull_reque
# First check if HEAD^2 exists (i.e., this is actually a merge commit) # First check if HEAD^2 exists (i.e., this is actually a merge commit)
if success(`git rev-parse --verify --quiet HEAD^2`) if success(`git rev-parse --verify --quiet HEAD^2`)
# Compare tree hashes to check if content actually differs # Compare tree hashes to check if content actually differs
merge_tree = chomp(read(`git rev-parse HEAD:`, String)) merge_tree = chomp(read(`git rev-parse HEAD^{tree}`, String))
pr_tree = chomp(read(`git rev-parse HEAD^2:`, String)) pr_tree = chomp(read(`git rev-parse HEAD^2^{tree}`, String))
has_diff = merge_tree != pr_tree has_diff = merge_tree != pr_tree
else else
# Not a merge commit, so no difference to report # Not a merge commit, so no difference to report