]> git.e2factory.org Git - e2factory.git/commitdiff
Use git_checkout() instead of hand-rolled solution
authorTobias Ulmer <tu@emlix.com>
Fri, 1 Nov 2013 15:46:12 +0000 (16:46 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:01:23 +0000 (15:01 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
global/e2-install-e2.lua

index 1fe3fbd2cd40eecd97c1fb5b99425bb96226b3b5..8841fccf678f089fc988d5e185dac09b4487a2dc 100644 (file)
@@ -169,9 +169,8 @@ local function e2_install_e2(arg)
     end
     e2lib.chdir(destdir)
 
-    -- checkout ref
-    local args = string.format("%s --", ref)
-    rc, re = e2lib.git(nil, "checkout", args)
+    -- change to requested branch or tag
+    rc, re = generic_git.git_checkout1(destdir, ref)
     if not rc then
         return false, e:cat(re)
     end
@@ -207,8 +206,7 @@ local function e2_install_e2(arg)
         end
         e2lib.chdir(destdir)
 
-        -- checkout ref
-        rc, re = e2lib.git(nil, "checkout", ref)
+        rc, re = generic_git.git_checkout1(destdir, ref)
         if not rc then
             return false, e:cat(re)
         end