Skip to content

Commit

Permalink
Fix oob
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Jun 23, 2024
1 parent a8f2a12 commit 27b618a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Orchestrator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ function main()

if !isnothing(first_unfinished_commit)
println("Commit $first_unfinished_commit not finished!")
last_finished_commit = shas[findfirst(x -> x == first_unfinished_commit, shas)-1]
idx = findfirst(x -> x == first_unfinished_commit, shas) - 1
last_finished_commit = idx == 0 ? julia_old_head : shas[idx]
println("Rolling back to prior to $first_unfinished_commit, i.e. $last_finished_commit")
LibGit2.reset!(julia_repo, LibGit2.GitCommit(julia_repo, last_finished_commit), LibGit2.Consts.RESET_HARD)
end
Expand Down

0 comments on commit 27b618a

Please sign in to comment.