aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-21 11:41:37 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-21 11:41:37 +1200
commit23d396bf9e2282262a4e3fa0dc18f47e8da63cc0 (patch)
treeb8d31c70893aaaad8a9a9b08f2c1f0b33069adfc
parentRemove unneeded arg to lt/gt funcs (diff)
downloadwatch-vcs-tags-23d396bf9e2282262a4e3fa0dc18f47e8da63cc0.tar.gz
watch-vcs-tags-23d396bf9e2282262a4e3fa0dc18f47e8da63cc0.zip
Add useful errors if tags not retrievable
-rwxr-xr-xwatch-git-tags5
1 files changed, 3 insertions, 2 deletions
diff --git a/watch-git-tags b/watch-git-tags
index 3d3b7c6..79e26d8 100755
--- a/watch-git-tags
+++ b/watch-git-tags
@@ -9,8 +9,9 @@ lt() {
# List sorted remote tags
rt() {
- git ls-remote -qt |
- awk '!/\^\{\}$/{print substr($2,11)}' |
+ { git ls-remote -qt ||
+ printf >&2 'Failed to retrieve tags for repository %s\n' "$PWD"
+ } | awk '!/\^\{\}$/{print substr($2,11)}' |
LC_COLLATE=C sort
}