]> git.e2factory.org Git - e2factory.git/commitdiff
fetch-project: fix detached HEAD status when using --branch
authorTobias Ulmer <tu@emlix.com>
Tue, 18 Sep 2018 17:36:17 +0000 (19:36 +0200)
committerTobias Ulmer <tu@emlix.com>
Mon, 10 Dec 2018 17:00:11 +0000 (18:00 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
global/e2-fetch-project.lua

index c501900cb3d539e78fbc4b35eaa3c8fbf80f3bb3..012ac66d7ef5495471fd29e030f163bf982797a6 100644 (file)
@@ -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