diff --git a/kiauh/utils/git_utils.py b/kiauh/utils/git_utils.py index 6f509ac..a967cb1 100644 --- a/kiauh/utils/git_utils.py +++ b/kiauh/utils/git_utils.py @@ -255,11 +255,23 @@ def get_remote_commit(repo: Path) -> str | None: return None -def git_cmd_clone(repo: str, target_dir: Path) -> None: - try: - command = ["git", "clone", repo, target_dir.as_posix()] - run(command, check=True) +def git_cmd_clone(repo: str, target_dir: Path, blolbless: bool = False) -> None: + """ + Clones a repository with optional blolbless clone. + :param repo: URL of the repository to clone. + :param target_dir: Path where the repository will be cloned. + :param blolbless: If True, perform a blolbless clone by adding the '--blolbless' flag. + """ + try: + command = ["git", "clone"] + + if blolbless: + command.append("--blolbless") + + command += [repo, target_dir.as_posix()] + + run(command, check=True) Logger.print_ok("Clone successful!") except CalledProcessError as e: error = e.stderr.decode() if e.stderr else "Unknown error"