From 22a76b5c1e421873f168dff46d5ebbf3f766c3ce Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Wed, 5 May 2021 18:59:23 +0200 Subject: [PATCH 1/2] Ignore r= commits. --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index f374b2f0..0747566f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -294,6 +294,7 @@ fn parse_bors_reviewer( .map(|r| r.trim_end_matches('`')) .map(|r| r.trim()) .filter(|r| !r.is_empty()) + .filter(|r| *r != "") .inspect(|r| { if !r .chars() From 017d20d9ca2362b9e8d373ec8e4cc08832444002 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Wed, 5 May 2021 18:59:31 +0200 Subject: [PATCH 2/2] Fetch missing commits. --- src/main.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main.rs b/src/main.rs index 0747566f..ba9fecf2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -355,6 +355,18 @@ fn build_author_map_( to: &str, ) -> Result> { let mut walker = repo.revwalk()?; + + if repo.revparse_single(to).is_err() { + // If a commit is not found, try fetching it. + git(&[ + "--git-dir", + repo.path().to_str().unwrap(), + "fetch", + "origin", + to, + ])?; + } + if from == "" { let to = repo.revparse_single(to)?.peel_to_commit()?.id(); walker.push(to)?;