[packages/rpm-build-tools] [shrc]: ac-tag: delete local branch as well if exists
glen
glen at pld-linux.org
Tue Aug 14 14:32:20 CEST 2012
commit 7eac21d31394fe2227d76a42567fac9a70ac3eee
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Aug 14 15:30:59 2012 +0300
[shrc]: ac-tag: delete local branch as well if exists
shrc.sh | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/shrc.sh b/shrc.sh
index 56e8dc8..c6ed28f 100755
--- a/shrc.sh
+++ b/shrc.sh
@@ -29,6 +29,10 @@ ac-tag() {
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
More information about the pld-cvs-commit
mailing list