feat: each citation names the code that asks

A profile that reads a libretro core and the original emulator cited both trees alike, and readers could not tell whether the core or the emulator asked for a file. A cited path now opens with source or upstream, the repository its lines are in. Emulator code a port carries is attributed upstream when the original holds the same value on the cited line.

profile_sync --attribute-refs writes the words from where the lines are found and follows a word already written. The site links each citation to that repository's pin, labels it libretro core or upstream emulator, and says on each file card whose code asks for it. A recale keeps the word, and mame_ref_audit reads the tree it names.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 05:52:13 +02:00
1 parent adea35e12a
commit dec0fdc163
9 files changed
+306 -21

No files matched your search

+7
View File
@@ -2755,6 +2755,12 @@ def _render_emulator_file(
for scope, checks in validation.items():
details.append(f"Validation ({scope}): {', '.join(checks)}")
if source_ref:
asker = requested_by(profile, source_ref)
if asker:
# A profile reading a libretro core and the original emulator
# cited both trees alike: readers could not tell which code asks
# for the file.
details.append(f"Asked for by: {asker}")
details.append(
f"Source: {_source_ref_markdown(profile, source_ref)}"
)
@@ -4869,6 +4875,7 @@ from sitewrite import ( # noqa: E402,F401
)
from sitesources import ( # noqa: E402,F401
link_prose_citations,
requested_by,
revision_markdown,
_repo_pins,
_forge_sources,