index : gitrs
A lightweight web interface for browsing Git repositories, implemented in Rust
about summary refs log tree commit diff

Diffstat (limited to 'src/git/tree.rs')

-rw-r--r-- src/git/tree.rs 9
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/git/tree.rs b/src/git/tree.rs
index 3af3311..60de1e2 100644
--- a/src/git/tree.rs
+++ b/src/git/tree.rs
@@ -58,12 +58,11 @@
            let kind = mode.kind();

            let size = if matches!(kind, EntryKind::Blob | EntryKind::BlobExecutable) {
                entry
                    .object()
                    .context("failed to load blob object")?
                    .try_into_blob()
                self.gix
                    .repo
                    .find_header(entry.oid())
                    .ok()
                    .map(|blob| blob.data.len() as u64)
                    .map(|h| h.size())
            } else {
                None
            };