MCPcopy Index your code
hub / github.com/openai/plugins / require_git_worktree_head

Function require_git_worktree_head

plugins/codex-security/scripts/workbench_db.py:917–921  ·  view source on GitHub ↗
(target: Path)

Source from the content-addressed store, hash-verified

915
916
917def require_git_worktree_head(target: Path) -> str:
918 metadata = git_target_metadata(target)
919 if not metadata["isGit"] or not metadata["isWorktree"] or not metadata["hasHead"]:
920 raise SystemExit("Review changes requires a non-bare Git worktree with a resolvable HEAD.")
921 return str(metadata["revision"])
922
923
924def require_review_changes_target(target: Path) -> str:

Callers 2

require_unchanged_targetFunction · 0.85

Calls 1

git_target_metadataFunction · 0.90

Tested by

no test coverage detected