diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-11-30 14:43:17 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-11-30 14:43:17 +1300 |
commit | adf9e04375d62af9b6b4fee77a6a2654356b0b9a (patch) | |
tree | a0884a372bec12a5b6a129aecdfa2f098d85aff7 | |
parent | Rename and refactor local functions (diff) | |
download | watch-vcs-tags-adf9e04375d62af9b6b4fee77a6a2654356b0b9a.tar.gz watch-vcs-tags-adf9e04375d62af9b6b4fee77a6a2654356b0b9a.zip |
Use short-circuit logic for pre-fetch test
-rwxr-xr-x | watch-git-tags | 5 |
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 |