From: Tobias Ulmer Date: Tue, 18 Sep 2018 17:36:17 +0000 (+0200) Subject: fetch-project: fix detached HEAD status when using --branch X-Git-Tag: e2factory-2.3.18rc1~75 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=627a79e6b1333ae36d945933ae85a80ab1d236a5;p=e2factory.git fetch-project: fix detached HEAD status when using --branch Signed-off-by: Tobias Ulmer --- diff --git a/global/e2-fetch-project.lua b/global/e2-fetch-project.lua index c501900..012ac66 100644 --- a/global/e2-fetch-project.lua +++ b/global/e2-fetch-project.lua @@ -169,8 +169,9 @@ local function e2_fetch_project(arg) error(e:cat(re)) end - rc, re = generic_git.git_checkout1(p.destdir, - "refs/heads/" .. p.branch) + -- checkout prefixes branch with "refs/heads/" on its own, + -- creates detached branch for full ref(!!) + rc, re = generic_git.git_checkout1(p.destdir, p.branch) if not rc then error(e:cat(re)) end