diff options
| author | ruki <[email protected]> | 2021-08-29 21:56:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-08-29 21:56:52 +0800 |
| commit | ab2c5e2a3b29bb63b23a7fa59c3f6d56cc56c47c (patch) | |
| tree | 0d2324fcf8b215228a0c1ce49baed48b61b792cf /xmake/modules/devel/git/clean.lua | |
| parent | 4497dd33fb475a388d5d51192d432b0156be78a3 (diff) | |
improve git ops
Diffstat (limited to 'xmake/modules/devel/git/clean.lua')
| -rw-r--r-- | xmake/modules/devel/git/clean.lua | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/xmake/modules/devel/git/clean.lua b/xmake/modules/devel/git/clean.lua index ae21c3d88..52fa81a0b 100644 --- a/xmake/modules/devel/git/clean.lua +++ b/xmake/modules/devel/git/clean.lua @@ -61,17 +61,6 @@ function main(opt) table.insert(argv, "-x") end - -- enter repository directory - local oldir = nil - if opt.repodir then - oldir = os.cd(opt.repodir) - end - -- clean 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 |
