diff options
| author | ruki <[email protected]> | 2024-11-21 14:44:00 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-11-21 14:44:00 +0800 |
| commit | 539c0af2fd0213d5a704f5e24288f54973a990ad (patch) | |
| tree | 675a5df9402f89f65eb964cabbca7357af2ae373 | |
| parent | 1bae1746ea64f19e0fe7e24ec2b0bbf22e78dee4 (diff) | |
| parent | 7f2eabcea1297a387c5314379d38a9ba7a472d9a (diff) | |
Merge pull request #5853 from qudix/dev
fix: reset locked repo before pulling
| -rw-r--r-- | xmake/modules/private/action/require/impl/repository.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/modules/private/action/require/impl/repository.lua b/xmake/modules/private/action/require/impl/repository.lua index aab908e5b..646e88e1b 100644 --- a/xmake/modules/private/action/require/impl/repository.lua +++ b/xmake/modules/private/action/require/impl/repository.lua @@ -84,6 +84,7 @@ function _get_packagedir_from_locked_repo(packagename, locked_repo) if network ~= "private" then -- pull the latest commit local remoteurl = proxy.mirror(locked_repo.url) or locked_repo.url + git.reset({verbose = option.get("verbose"), repodir = repodir_local, hard = true}) git.pull({verbose = option.get("verbose"), remote = remoteurl, branch = locked_repo.branch, repodir = repodir_local, force = true}) -- re-checkout to the given commit ok = try {function () git.checkout(locked_repo.commit, {verbose = option.get("verbose"), repodir = repodir_local}); return true end} |
