repo: implement list_refs and list_refs_ext

This commit is contained in:
Felix Krull authored and Colin Walters committed 2022-05-06 12:53:53 -04:00
1 parent ae9413343d
commit dff1cf631b
3 files changed
+76 -7

No files matched your search

+5 -3
View File
@@ -10,11 +10,13 @@ use libostree::prelude::*;
fn main() {
let repo = libostree::Repo::new_for_path("../../../repo-bare");
//let result = repo.create(libostree::RepoMode::Archive, Option::None);
//result.expect("we did not expect this to fail :O");
repo.open(None).expect("should have opened");
let refs = repo.list_refs(None, None).unwrap();
for (refspec, checksum) in refs {
println!(" {} = {}", refspec, checksum);
}
let (file, checksum) = repo.read_commit("test", None).unwrap();
println!("path: {:?}", file.get_path());