From: Tobias Ulmer Date: Fri, 1 Nov 2013 15:46:12 +0000 (+0100) Subject: Use git_checkout() instead of hand-rolled solution X-Git-Tag: e2factory-2.3.15rc1~421 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=f33934d35f9074c73e77b176b48bea6b73f7a9b7;p=e2factory.git Use git_checkout() instead of hand-rolled solution Signed-off-by: Tobias Ulmer --- diff --git a/global/e2-install-e2.lua b/global/e2-install-e2.lua index 1fe3fbd..8841fcc 100644 --- a/global/e2-install-e2.lua +++ b/global/e2-install-e2.lua @@ -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