diff options
| author | Max Audron <audron@cocaine.farm> | 2025-04-08 16:48:57 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2025-04-08 16:48:57 +0200 |
| commit | 9be68804bae9833a4749377e05bfaebf7d64f2b1 (patch) | |
| tree | 5231887860d2cded23a931ea8d76a6c07d54c72c /src/repo/mod.rs | |
| parent | delete files removed from index during checkout (diff) | |
only checkout repo if clean
Diffstat (limited to 'src/repo/mod.rs')
| -rw-r--r-- | src/repo/mod.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/repo/mod.rs b/src/repo/mod.rs index 538bf31..480a486 100644 --- a/src/repo/mod.rs +++ b/src/repo/mod.rs @@ -8,8 +8,8 @@ use tracing::error; use crate::forge::Project; mod aggregate; -mod repostate; mod git; +mod repostate; pub use aggregate::*; pub use repostate::*; @@ -47,6 +47,8 @@ pub enum RepoError { NoLocalRepo, #[error("local git repo does not have a remote")] NoRemoteFound, + #[error("no head found")] + NoHead, #[error("could not determine default branch based on remote HEAD")] NoDefaultBranch, #[error("repo is not checked out")] @@ -65,6 +67,10 @@ pub enum RepoError { pub enum LocalRepoState { #[error("operation in progress: {0:?}")] InProgress(gix::state::InProgress), + #[error("currently checked out branch is not default")] + NonDefaultBranch, + #[error("{0} unpushed commits")] + UnpushedCommits(usize), #[error("head is detached")] DetachedHead, #[error("head is unborn")] |
