INNER CODE UNIT · Python
check_source
dotnet/sdk · .github/scripts/check_vendored_files.py:242
def check_source(entry: Entry, source_index: int, source: Source) -> DriftResult:
status, current_blob_sha = _get_blob_sha(source.repo, source.ref, source.path)
if status == 404:
return DriftResult(
entry=entry, source_index=source_index, source=source,
status="missing", current_blob_sha=None, current_ref_sha=None,
detail=(
f"Upstream path `{source.path}` no longer exists on "
f"`{source.repo}@{source.ref}`. The file may have been renamed, "
f"deleted, or the tracked ref was renamed."
),
diff_text="",
)
if current_blob_sha is None:
return DriftResult(
entry=entry, source_index=source_index, source=source,