mirror of
https://github.com/wekan/wekan.git
synced 2026-11-20 09:45:04 -05:00
Syncing wekan/wekan cloned the whole GitHub repository - 365,000 objects, 500 MB - into .tools/wekan-github, although it is this checkout (~/repos/wekan on Linux, ~/Documents/repos/wekan on macOS, Downloads\repos\wekan on Windows). Only the destination mirrors (wekan-gitlab, wekan-codeberg ...) need checkouts of their own. The source's branches and tags are fetched into this checkout instead, under the private namespace refs/mirror-source/<source>/, which already holds nearly every object: 1.7 seconds for 1,278 refs, measured. That namespace is not a branch; the working tree and local main are untouched, so unpushed local commits never reach a mirror. The fetched refs are deleted again in a finally, after the push and also when the fetch, the push or the merge-preserving retry fails. tests/activeForgeMirror.test.cjs and tests/mirrorGitDirectories.test.cjs run syncGit against a stand-in checkout (WEKAN_MIRROR_SOURCE_CHECKOUT for the CLI), assert that GitHub's wekan is not cloned, that only the destination is, and that the source refs are cleared - also after a failed fetch. Thanks to xet7 !