From f33934d35f9074c73e77b176b48bea6b73f7a9b7 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Fri, 1 Nov 2013 16:46:12 +0100 Subject: [PATCH] Use git_checkout() instead of hand-rolled solution Signed-off-by: Tobias Ulmer --- global/e2-install-e2.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 -- 2.39.5