pub trait Vcs {
// Required methods
fn is_repo(&self, root: &Path) -> bool;
fn init_repo(&self, root: &Path) -> Result<(), JoyError>;
fn user_email(&self) -> Result<String, JoyError>;
fn version_tags(&self, root: &Path) -> Result<Vec<String>, JoyError>;
fn latest_version_tag(
&self,
root: &Path,
) -> Result<Option<String>, JoyError>;
}Expand description
VCS read operations that Joy needs.
Required Methods§
Sourcefn is_repo(&self, root: &Path) -> bool
fn is_repo(&self, root: &Path) -> bool
Check if the given directory is inside a VCS repository.
Sourcefn init_repo(&self, root: &Path) -> Result<(), JoyError>
fn init_repo(&self, root: &Path) -> Result<(), JoyError>
Initialize a new repository at the given path.
Sourcefn user_email(&self) -> Result<String, JoyError>
fn user_email(&self) -> Result<String, JoyError>
Get the current user’s email from VCS config.
List all version tags (e.g. v0.5.0), sorted descending.