aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 780ab62..4d810b0 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -44,15 +44,15 @@ fn main() {
// TODO: error if more than one ref given
let refname = &matches.free[0];
- let oid = match repo.refname_to_id(&refname) {
- Ok(oid) => oid,
+ let object = match repo.revparse_single(&refname) {
+ Ok(object) => object,
Err(e) => {
eprintln(&e);
process::exit(exitcode::USAGE);
},
};
- match repo.find_tree(oid) {
+ match object.peel_to_tree() {
Ok(t) => t,
Err(e) => {
eprintln(&e);