]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
shrc: ac-tag: use git show-ref
authorElan Ruusamäe <glen@delfi.ee>
Mon, 13 Aug 2012 05:23:51 +0000 (08:23 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 13 Aug 2012 05:23:51 +0000 (08:23 +0300)
rpm-build.sh

index ddde76590da31ecf2f4d212d26f15d3095d50ced..04da3c57f54fd6f6c5ed2f3af8718a3eb9067f47 100755 (executable)
@@ -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
This page took 0.034122 seconds and 4 git commands to generate.