Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-08 22:12:17 +0200
committerErich Eckner <git@eckner.net>2019-07-08 22:12:17 +0200
commit0c16f57f82a0940aab8539eecd0ab7953e804287 (patch)
tree241c1a278c8f21708cc6bc256c8e0f2abf4f5922 /bin
parent952bf4fb6f84ea52a99ab7298db7c2958216292a (diff)
bin/nit-picker: update git repos before complaining about missing commits
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nit-picker12
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
;;
*)