From bde733890aeea0a1bbbdcbc1ad14fe05ed58661a Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 2 Jun 2022 21:27:33 +0200 Subject: 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. --- src/git.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') 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), -- cgit v1.2.3