try using push head
This commit is contained in:
parent
ddc7403e8d
commit
99af64c259
1 changed files with 3 additions and 1 deletions
|
|
@ -298,7 +298,9 @@ impl XBuilder {
|
||||||
match git_res {
|
match git_res {
|
||||||
Ok(repo) => {
|
Ok(repo) => {
|
||||||
let mut revwalk = repo.revwalk().expect("Failed to create revwalk");
|
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 {
|
for cid in revwalk {
|
||||||
let commit_id = cid.expect("Failed to get commit id");
|
let commit_id = cid.expect("Failed to get commit id");
|
||||||
let commit = repo.find_commit(commit_id).expect("Failed to find commit");
|
let commit = repo.find_commit(commit_id).expect("Failed to find commit");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue