aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-06-02 21:27:33 +0200
committerTeddy Wing2022-06-02 21:27:33 +0200
commitbde733890aeea0a1bbbdcbc1ad14fe05ed58661a (patch)
tree21a17a706b632b3340da3105e9c9e8183a0967fc
parent627d6c7e2b0e218213fa2a9c19036489c66c3141 (diff)
downloadreflectub-bde733890aeea0a1bbbdcbc1ad14fe05ed58661a.tar.bz2
git.rs: Add ideas for new error variants
These variants should make it easier to trace where in the code that a particular error occurred, and include a context-descriptive error message.
-rw-r--r--src/git.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/git.rs b/src/git.rs
index ccc0922..684cb66 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -25,6 +25,19 @@ use std::path::Path;
#[derive(Debug, thiserror::Error)]
pub enum Error {
+ MirrorCreateRepo(),
+ MirrorConfig(),
+ // What is remote_with_fetch?
+ // A: Add a remote with the provided refspec to the repository's config
+ MirrorFetch(),
+
+ UpdateOpenRepo(),
+ UpdateGetRemotes(),
+ UpdateFindRemote(),
+ UpdateFetch(),
+
+ GitChangeBranch(),
+
#[error("git error")]
Git(#[from] git2::Error),