From 2ea033741754afc08336f21055a04e4000ee22dd Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 27 Sep 2014 15:41:54 -0400 Subject: uggh, more branch creation twiddling --- package.inc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- cgit v1.2.3-70-g09d2