You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test hub-fetch-run.py's Unborn-HEAD Rewrite and Its Probe-Failure Path #2321
catalog/snippets/hub-fetch-run.py has no tests for its first-commit path. On an unborn HEAD, resolve_unborn_head rewrites --diff HEAD so the prose gate still runs, and head_is_unborn tells a confirmed unborn HEAD apart from a failed probe. Nothing in tests/ covers either function, so a regression could widen the rewrite to other arguments, or treat a probe failure as an unborn repository and skip the gate without any notice.
Copilot raised this on ptr727/KiCadLibrary#70, which carries the snippet byte-for-byte. The fix belongs here, at the canonical source.
Fix
Add focused tests for:
only --diff HEAD is rewritten on an unborn HEAD, and every other argument is preserved
nothing is rewritten when HEAD has a commit
a failed git rev-parse probe, such as a non-zero exit with stderr output or a missing repository, is not read as unborn.
Activity
Name the Fetched Commit in hub-fetch-run.py and Test Its Unborn-HEAD …