diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index 883fd635..e61bb9d2 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -324,10 +324,7 @@ def clone_repo_mirror( # Clone if the repo doesn't exist. If the mirror is local we don't copy # the objects to make it much faster. try: - # Adding `--revision {fetch}` to the clone would be more efficient - # due to avoiding an unnecessary checkout, however we need to - # support versions of git older than v2.49. - run_command(f"git clone --shared {mirror_loc} {loc}") + run_command(f"git clone --shared --no-checkout {mirror_loc} {loc}") run_command(f"git -C {loc} checkout {fetch}") except SubprocessRunError: logger.error(