mirror of
https://github.com/julia-actions/julia-runtest.git
synced 2026-02-12 02:56:55 +08:00
Update test_harness.jl
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user