aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index be38348..ab65d75 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -361,10 +361,7 @@ async fn build_response<C: Controller>(
return post_routes::build_response(origin, &params, controller, ctx, body, parts).await;
}
- let mut tree = ctx
- .repo
- .revparse_single(&ctx.branch.rev_str())
- .map(|r| r.into_commit().unwrap().tree().unwrap());
+ let mut tree = ctx.branch_head()?.tree();
if ctx.path.components().next().is_some() {
let entr = match tree.and_then(|t| t.get_path(ctx.path.as_ref())) {