From 627a79e6b1333ae36d945933ae85a80ab1d236a5 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Tue, 18 Sep 2018 19:36:17 +0200 Subject: [PATCH] fetch-project: fix detached HEAD status when using --branch Signed-off-by: Tobias Ulmer --- global/e2-fetch-project.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5