Repository navigation
Reject unknown commit IDs passed to --only - #192
Merged
connabyss merged 1 commit intoNov 4, 2026
Merged
Conversation
Return a clear error with exit code 2 for missing commit IDs, list only missing IDs, and preserve the no-code commit behavior. Add regression coverage. Tests: python -m pytest -n auto — 355 passed, 4 skipped. Assisted-by: Cue
Owner
|
Thanks @phsecx! Clean fix, and the tests cover exactly the right cases. Merged. |
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong, what changed, how checked:
Unknown IDs passed to
--onlywere silently dropped, so--only zzzzreported “Nothing to check” and exited with code 0. The selected commits are now checked against the requested IDs before filtering for code changes. Missing IDs produce a clear error, agit log --onelinehint, and exit code 2. When several IDs are supplied, the error names only the missing ones. A valid commit that changed no code keeps the existing “Nothing to check” behavior.The change adds regression coverage for a single unknown ID, mixed valid/missing IDs, and a valid empty commit. Only
recent.pyandtests/test_shard.pyare changed.Fixes #178
python -m pytestpasses (it runstests/selftest.pytoo), and CI is green. The local full suite passes; CI is pending at submission.Validation:
ec474f3):python -m pytest -n auto— 355 passed, 4 skipped (Linux, Python 3.12.3).git diff --check— clean.Assisted-by: Cue
Cue prepared the patch and performed the local validation reported above. The account owner authorized submission; no personal review or test execution by the account owner is claimed.