Add default tracking configuration
This commit is contained in:
10
src/repo.rs
10
src/repo.rs
@@ -42,10 +42,20 @@ impl RepoError {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TrackingConfig {
|
||||
pub default: bool,
|
||||
pub default_remote: String,
|
||||
pub default_remote_prefix: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct WorktreeRootConfig {
|
||||
pub persistent_branches: Option<Vec<String>>,
|
||||
|
||||
pub track: Option<TrackingConfig>,
|
||||
}
|
||||
|
||||
pub fn read_worktree_root_config(worktree_root: &Path) -> Result<Option<WorktreeRootConfig>, String> {
|
||||
|
||||
Reference in New Issue
Block a user