try using push head

This commit is contained in:
Pakin 2025-09-08 16:04:47 +07:00
parent ddc7403e8d
commit 99af64c259

View file

@ -298,7 +298,9 @@ impl XBuilder {
match git_res {
Ok(repo) => {
let mut revwalk = repo.revwalk().expect("Failed to create revwalk");
println!("revwalk ok");
revwalk.set_sorting(git2::Sort::TIME).unwrap();
revwalk.push_head().unwrap();
for cid in revwalk {
let commit_id = cid.expect("Failed to get commit id");
let commit = repo.find_commit(commit_id).expect("Failed to find commit");