From d2798955639486d447aec4d42556118d2db6ca47 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Tue, 16 Apr 2019 17:51:56 +0200 Subject: [PATCH] Only pull if not freshly cloned --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f059c76..d3f82e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -130,8 +130,9 @@ fn github( let file = Path::new(&path); if !file.exists() { Repository::clone(&format!("https://{}", gh_path), file)?; + } else { + pull(&path)?; } - pull(&path)?; let hoc = hoc(&path)?; let badge_opt = BadgeOptions { subject: "Hits-of-Code".to_string(),