summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-09-27 15:41:54 -0400
committerDave Reisner <dreisner@archlinux.org>2014-09-27 15:49:07 -0400
commit2ea033741754afc08336f21055a04e4000ee22dd (patch)
tree6ee74c71e6cb0b63c183df2e62e921c35299c906
parente6f0a4902a8d1df06ae864525c0d09652c619190 (diff)
downloadasp32-2ea033741754afc08336f21055a04e4000ee22dd.tar.xz
uggh, more branch creation twiddling
-rw-r--r--package.inc.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/package.inc.sh b/package.inc.sh
index a65048f..d4e7a4e 100644
--- a/package.inc.sh
+++ b/package.inc.sh
@@ -121,7 +121,8 @@ package_checkout() {
package_init "$pkgname" remote || return 1
- git branch -qf --no-track "$remote/packages/$pkgname" "$remote/packages/$pkgname"
+ git show-ref -q "refs/heads/$remote/packages/$pkgname" ||
+ git branch -qf --no-track {,}"$remote/packages/$pkgname"
git clone "$ASPROOT" --single-branch --branch "$remote/packages/$pkgname" \
"$startdir/$pkgname"