diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-08-17 23:39:43 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2014-08-18 12:09:54 -0400 |
commit | eab3a16099e364f62303d5bbeca002ac14f697be (patch) | |
tree | e1e35257b89f9a04cf85d27f3430f809d3427b27 /remote.inc.sh | |
parent | e3c146afe29ff863679284c887c867fe93d58afd (diff) | |
download | asp32-eab3a16099e364f62303d5bbeca002ac14f697be.tar.xz |
cleanup local tracking branches when untracking
Also, make both package_untrack and remote_untrack robust against
partially existing branches.
Diffstat (limited to 'remote.inc.sh')
-rw-r--r-- | remote.inc.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/remote.inc.sh b/remote.inc.sh index 2cce6ba..f7e5539 100644 --- a/remote.inc.sh +++ b/remote.inc.sh @@ -82,5 +82,7 @@ remote_get_url() { remote_untrack() { local remote=$1 pkgname=$2 - git branch -dr "$remote/packages/$pkgname" + if git show-ref -q "refs/remotes/$remote/packages/$pkgname"; then + git branch -dr "$remote/packages/$pkgname" + fi } |