diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-11-16 23:05:09 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-11-16 23:05:09 +0100 |
| commit | db2ed2b36776f1093d67d212bc3295f148039c0d (patch) | |
| tree | 4e23ea8ad65aed796296ebc52d79a48a03ec55ba /src/main.rs | |
| parent | 70938201e78791c8c8dd608419904549449909c4 (diff) | |
Add ability to set description
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 5b65148..e4b2dde 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,8 +61,7 @@ fn main() { } fn get_config(config: Option<&str>) -> Config { - let config_path = match config - { + let config_path = match config { Some(c) => Cow::Borrowed(c), None => match env::var("GIT_MIRROR_CONFIG") { Ok(c) => Cow::Owned(c), @@ -89,6 +88,10 @@ fn get_config(config: Option<&str>) -> Config { fn init(path: &Path, project: &ProjectConfig) -> Result<(), git2::Error> { let _repo = Repository::clone(&project.url, path)?; + if let Some(d) = &project.description { + utils::set_description(path, d).unwrap(); + } + Ok(()) } |
