Skip to content

Commit 232160f

Browse files
committed
pyoxidizer: change parent commit walking strategy
This is more robust.
1 parent 1369ef9 commit 232160f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyoxidizer/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ fn canonicalize_path(path: &Path) -> Result<PathBuf, std::io::Error> {
3535
fn find_root_git_commit(commit: Commit) -> Commit {
3636
let mut current = commit;
3737

38-
while current.parent_count() != 0 {
39-
current = current.parents().next().unwrap();
38+
while let Ok(parent) = current.parent(0) {
39+
current = parent;
4040
}
4141

4242
current

0 commit comments

Comments
 (0)