commit aea94aafdf4e5cb86959fba4c9739883d3920bdb
Author: Elan Ruusamäe <[email protected]>
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
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to