MCPcopy
hub / github.com/github/spec-kit / _is_managed

Function _is_managed

src/specify_cli/shared_infra.py:383–392  ·  view source on GitHub ↗
(rel: str, dst: Path)

Source from the content-addressed store, hash-verified

381 prior_hashes = dict(manifest.files)
382
383 def _is_managed(rel: str, dst: Path) -> bool:
384 expected = prior_hashes.get(rel)
385 if not expected or not dst.is_file() or dst.is_symlink():
386 return False
387 if manifest.is_recovered(rel):
388 return False
389 try:
390 return _sha256(dst) == expected
391 except OSError:
392 return False
393
394 skipped_files: list[str] = []
395 preserved_user_files: list[str] = []

Callers 2

_decide_overwriteFunction · 0.85
install_shared_infraFunction · 0.85

Calls 3

_sha256Function · 0.85
is_recoveredMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected