#[non_exhaustive]pub enum Foreign {
Files(PathBuf),
Checkout(PathBuf),
Branch(PathBuf, String),
Repository(PathBuf),
Inside(PathBuf, PathBuf),
Unreadable(PathBuf, String),
Detached(PathBuf),
Nested(PathBuf, PathBuf),
Home(PathBuf),
}Expand description
A template path that is not a git-cow extra checkout, inside the io::Error that add_with,
warm_with and remove_template return. They leave it alone, and only Options::force
in add_with replaces Foreign::Files. The message names the path, the advice is the caller’s
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Files(PathBuf)
A file, or a directory with files outside git
Checkout(PathBuf)
A main checkout, which git-cow would reset or delete
Branch(PathBuf, String)
A worktree on this branch, while extra checkouts are always detached
Repository(PathBuf)
A git repository itself, bare or a .git directory
Inside(PathBuf, PathBuf)
A directory with files tracked by the checkout at the second path
Unreadable(PathBuf, String)
A worktree git cannot read, for this reason, that git-cow did not make
Detached(PathBuf)
A detached worktree with no git-cow lock beside it, or one in a rebase, merge or bisect
Nested(PathBuf, PathBuf)
A directory holding the checkout or repository at the second path
Home(PathBuf)
The home folder, or a folder above it
Trait Implementations§
Source§impl Error for Foreign
impl Error for Foreign
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()