Commit 110f79f0 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

auto-build: naming of build branches fixed for non-heads

parent f8cba07b
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -209,8 +209,17 @@ build ()
	cd "$dir"
	(
		unset GIT_DIR
		remote_ref="${ref/heads/remotes/origin}"
		git fetch origin
		git checkout -B "${ref/heads\//}" "${ref/heads/remotes/origin}"
		git fetch origin --tags
		case "${ref%%/*}" in
			heads)
				git checkout -B "${ref/heads\//}" "$remote_ref"
				;;
			*)
				git checkout -B build/ref/"$ref" "$remote_ref"
				;;
		esac
		git clean -f -d -q -x
		git reset --hard
	)