aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-11-30 14:43:17 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-11-30 14:43:17 +1300
commitadf9e04375d62af9b6b4fee77a6a2654356b0b9a (patch)
treea0884a372bec12a5b6a129aecdfa2f098d85aff7
parentRename and refactor local functions (diff)
downloadwatch-vcs-tags-adf9e04375d62af9b6b4fee77a6a2654356b0b9a.tar.gz
watch-vcs-tags-adf9e04375d62af9b6b4fee77a6a2654356b0b9a.zip
Use short-circuit logic for pre-fetch test
-rwxr-xr-xwatch-git-tags5
1 files changed, 2 insertions, 3 deletions
diff --git a/watch-git-tags b/watch-git-tags
index 7ff640a..02814cb 100755
--- a/watch-git-tags
+++ b/watch-git-tags
@@ -57,9 +57,8 @@ for repo ; do (
# Attempt to quietly fetch new tags so that we don't notify about the same
# ones next time
- if [ -s new ] ; then
- git fetch --quiet --tags
- fi
+ [ -s new ] || continue
+ git -C "$repo" fetch --quiet --tags
) & done