🏡 index : ~doyle/rgit.git

author holly sparkles <sparkles@holly.sh> 2024-01-05 15:35:39.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2024-01-06 1:10:47.0 +00:00:00
commit
deb257b2d6a294d14c0e88cd5c3479c5b1e477fd [patch]
tree
99003d98f3bfb67f12b75ba0d94a1e59e9111998
parent
6c57fb19e76625e9cec5a4d98044694d013d752a
download
deb257b2d6a294d14c0e88cd5c3479c5b1e477fd.tar.gz

Redirect repository i/o errors from frontend to error log

Signed-off-by: Jordan Doyle <jordan@doyle.la>

Diff

 src/git.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/git.rs b/src/git.rs
index 22468b8..8c2981d 100644
--- a/src/git.rs
+++ a/src/git.rs
@@ -65,7 +65,10 @@
        })
        .await
        .context("Failed to join Tokio task")?
        .context("Failed to open repository")?;
        .map_err(|err| {
            error!("{}", err);
            anyhow!("Failed to open repository")
        })?;

        Ok(Arc::new(OpenRepository {
            git: self,