MCPcopy Create free account
hub / github.com/BillHuang2001/evogit / checkout

Function checkout

python-impl/evogit/utils/git.py:519–528  ·  view source on GitHub ↗

Checkout the specified commit.

(config: EvoGitConfig, commit: str)

Source from the content-addressed store, hash-verified

517
518
519def checkout(config: EvoGitConfig, commit: str) -> None:
520 """Checkout the specified commit."""
521 # -q is quiet, --detach is used to checkout the commit in detached HEAD mode
522 subprocess.run(
523 ["git", "checkout", "-q", "--detach", commit],
524 cwd=config.git_dir,
525 check=True,
526 stdout=subprocess.DEVNULL,
527 stderr=subprocess.DEVNULL,
528 )
529
530
531def add_temp_worktree(config: EvoGitConfig, branch: str) -> str:

Callers 1

update_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected