From 0c16f57f82a0940aab8539eecd0ab7953e804287 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 8 Jul 2019 22:12:17 +0200 Subject: bin/nit-picker: update git repos before complaining about missing commits --- bin/nit-picker | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/nit-picker b/bin/nit-picker index 309fb5b..63f71aa 100755 --- a/bin/nit-picker +++ b/bin/nit-picker @@ -87,10 +87,14 @@ while pgrep -x ii >/dev/null; do # shellcheck disable=SC2154 if ! git -C "${git_dir}" cat-file -t "${git_rev}" 2> /dev/null | \ grep -qxF 'commit'; then - printf 'commit %s is missing from repository %s\n' \ - "${git_rev}" \ - "${git_repo}" \ - | irc_say + git -C "${git_dir}" fetch --all -p >/dev/null 2>&1 + if ! git -C "${git_dir}" cat-file -t "${git_rev}" 2> /dev/null | \ + grep -qxF 'commit'; then + printf 'commit %s is missing from repository %s\n' \ + "${git_rev}" \ + "${git_repo}" \ + | irc_say + fi fi ;; *) -- cgit v1.2.3-70-g09d2