diff options
Diffstat (limited to 'xmake/modules/devel/git/checkout.lua')
| -rw-r--r-- | xmake/modules/devel/git/checkout.lua | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/xmake/modules/devel/git/checkout.lua b/xmake/modules/devel/git/checkout.lua index 7a32aa3b1..c78d8f439 100644 --- a/xmake/modules/devel/git/checkout.lua +++ b/xmake/modules/devel/git/checkout.lua @@ -47,17 +47,6 @@ function main(commit, opt) -- init argv local argv = {"checkout", commit} - -- enter repository directory - local oldir = nil - if opt.repodir then - oldir = os.cd(opt.repodir) - end - -- checkout it - os.vrunv(git.program, argv) - - -- leave repository directory - if oldir then - os.cd(oldir) - end + os.vrunv(git.program, argv, {curdir = opt.repodir}) end |
