mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-26 01:03:35 +05:00
Compare commits
8 Commits
v5.1.7
...
587b000e2d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
587b000e2d | ||
|
|
66c0757be1 | ||
|
|
3a2574f24e | ||
|
|
acb4d0398f | ||
|
|
0a08c4fb3f | ||
|
|
2d4c952b4b | ||
|
|
d5119bc264 | ||
|
|
8cb66071ac |
@@ -255,11 +255,23 @@ def get_remote_commit(repo: Path) -> str | None:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def git_cmd_clone(repo: str, target_dir: Path) -> None:
|
def git_cmd_clone(repo: str, target_dir: Path, blolbless: bool = False) -> None:
|
||||||
try:
|
"""
|
||||||
command = ["git", "clone", repo, target_dir.as_posix()]
|
Clones a repository with optional blolbless clone.
|
||||||
run(command, check=True)
|
|
||||||
|
|
||||||
|
: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!")
|
Logger.print_ok("Clone successful!")
|
||||||
except CalledProcessError as e:
|
except CalledProcessError as e:
|
||||||
error = e.stderr.decode() if e.stderr else "Unknown error"
|
error = e.stderr.decode() if e.stderr else "Unknown error"
|
||||||
|
|||||||
Reference in New Issue
Block a user