diff options
author | Erich Eckner <git@eckner.net> | 2019-07-08 22:12:17 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-07-08 22:12:17 +0200 |
commit | 0c16f57f82a0940aab8539eecd0ab7953e804287 (patch) | |
tree | 241c1a278c8f21708cc6bc256c8e0f2abf4f5922 | |
parent | 952bf4fb6f84ea52a99ab7298db7c2958216292a (diff) | |
download | builder-0c16f57f82a0940aab8539eecd0ab7953e804287.tar.xz |
bin/nit-picker: update git repos before complaining about missing commits
-rwxr-xr-x | bin/nit-picker | 12 |
1 files 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 ;; *) |