]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - shrc.sh
relup: fix commit part
[packages/rpm-build-tools.git] / shrc.sh
diff --git a/shrc.sh b/shrc.sh
index ccc3997daf64db6943cf39a8a49f51781323bab1..c6ed28fddc198620dc3c30e253a68a03a58bce03 100755 (executable)
--- a/shrc.sh
+++ b/shrc.sh
@@ -24,10 +24,15 @@ ac-tag() {
        # see if remote has branch present
        local branch=AC-branch
        if git show-ref -q refs/remotes/origin/$branch; then
+               git fetch --tags
                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
+               # delete local branch if exists
+               git show-ref -q refs/heads/$branch && git branch -d $branch
+
+               # drop remote branch
                git push --delete origin $branch
        fi
 
This page took 0.022468 seconds and 4 git commands to generate.