fix(tools): retain source commit when Git status fails #5713
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5713"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-14T07:45:39Z.
What
An audit JSON loses a valid
source_commitwhengit rev-parse HEADsucceeds butgit status --porcelainfails, for example because a submodule's Git directory is unreadable or missing. This occurred in a local title audit: the source revision was readable, but status failed on LibAtrac9 and the report set both provenance fields to null.Keep the successfully read revision and set only
source_dirtyto null when status is unavailable. A failed revision query still leaves both fields null. Import classification and exit status are unchanged.Tested
Windows x64, Python 3.14 and Git; current main
b27d18c3e, headfd3c67960.source_dirtynull rather than dropping both fields.git_stampor implements this partial-provenance handling.Current-head CI for
fd3c67960passed conventions and eligibility, plus all three relinker builds and complete test suites (Build):Full runtime-library jobs were skipped by the repository's PR workflow.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:08:53Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
tools/import_audit.pytools/tests/test_import_audit.pyImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T12:11:59Z.
Checked
git_stamp(rev-parse and status now fail independently; a failed rev-parse still gives(None, None)) andsource_dirtyis only dumped to the JSON. Both new tests fail againstmain'simport_audit.py(source_commitisNone) and pass with the change; relinker CI green on all three hosts. Merging.