[packages/rpm-build-tools] shrc: ac-tag: use git show-ref
glen
glen at pld-linux.org
Mon Aug 13 07:24:57 CEST 2012
commit aea94aafdf4e5cb86959fba4c9739883d3920bdb
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Aug 13 08:23:51 2012 +0300
shrc: ac-tag: use git show-ref
rpm-build.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rpm-build.sh b/rpm-build.sh
index ddde765..04da3c5 100755
--- a/rpm-build.sh
+++ b/rpm-build.sh
@@ -23,8 +23,8 @@ alias $dist-requires=dist-requires
ac-tag() {
# see if remote has branch present
local branch=AC-branch
- if [ -n "$(git branch -r | grep $branch)" ]; then
- if [ -z "$(git tag --points-at $branch)" ]; then
+ if git show-ref -q refs/remotes/origin/$branch; then
+ if [ -z "$(git tag --points-at $branch 2>/dev/null)" ]; then
echo >&2 "There's no tag pointing to current $branch; refusing to delete branch"
return 1
fi
More information about the pld-cvs-commit
mailing list