From db2ed2b36776f1093d67d212bc3295f148039c0d Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Mon, 16 Nov 2020 23:05:09 +0100 Subject: Add ability to set description --- src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main.rs') 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(()) } -- cgit v1.2.3