Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/package.inc.sh
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-08-17 23:39:43 -0400
committerDave Reisner <dreisner@archlinux.org>2014-08-18 12:09:54 -0400
commiteab3a16099e364f62303d5bbeca002ac14f697be (patch)
treee1e35257b89f9a04cf85d27f3430f809d3427b27 /package.inc.sh
parente3c146afe29ff863679284c887c867fe93d58afd (diff)
cleanup local tracking branches when untracking
Also, make both package_untrack and remote_untrack robust against partially existing branches.
Diffstat (limited to 'package.inc.sh')
-rw-r--r--package.inc.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/package.inc.sh b/package.inc.sh
index 1456baf..6d6407f 100644
--- a/package.inc.sh
+++ b/package.inc.sh
@@ -141,6 +141,14 @@ package_get_repos() {
printf '%s\n' "${!repos[@]}"
}
+package_untrack() {
+ local pkgname=$1 remote=$2
+
+ if git show-ref -q "refs/heads/$remote/packages/$pkgname"; then
+ git branch -D "$remote/packages/$pkgname"
+ fi
+}
+
_package_shortlog() {
local pkgname=$1 remote=$2