Give repos a namespace to allow subdirectories
This commit is contained in:
15
src/repo.rs
15
src/repo.rs
@@ -114,11 +114,24 @@ pub struct Remote {
|
||||
#[derive(Debug)]
|
||||
pub struct Repo {
|
||||
pub name: String,
|
||||
|
||||
pub namespace: Option<String>,
|
||||
pub worktree_setup: bool,
|
||||
pub remotes: Option<Vec<Remote>>,
|
||||
}
|
||||
|
||||
impl Repo {
|
||||
pub fn fullname(&self) -> String {
|
||||
match &self.namespace {
|
||||
Some(namespace) => format!("{}/{}", namespace, self.name),
|
||||
None => self.name.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_namespace(&mut self) {
|
||||
self.namespace = None
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RepoChanges {
|
||||
pub files_new: usize,
|
||||
pub files_modified: usize,
|
||||
|
||||
Reference in New Issue
Block a user