Repository navigation
fix(git): no log cap notice under git's usage on git 2.56 - #4578
Merged
Merged
Conversation
git 2.56 answers `-h` with its usage and exit 0, where every earlier release exited 129. `rtk git log` read "git refused the walk" from an exit code of 128 or more, so on 2.56 `rtk git log -hp` ran the cap probe after the usage text, the probe got the usage again, read it as commits left over, and appended "[rtk] capped at 10 commits" under it. `a_clustered_h_is_answered_by_git_once` fails this way on the macOS and Windows runners that moved to git 2.56 (2.55 still passes). A `-h` flag, alone or in a cluster, now counts as a walk that never ran. Only a flag token does: `--grep -h` and `-- -h` still run the walk and still get the notice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
📊 Automated PR Analysis
SummaryFixes Review Checklist
Analyzed automatically by wshm · This is an automated analysis, not a human review. |
This was referenced Oct 15, 2026
5 tasks done
aeppling
approved these changes
Oct 16, 2026
aeppling
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Verified against develop on git 2.55 and 2.56: the false cap notice under -h usage is gone, no true notice is lost, and stdout and exit codes are unchanged.
Merged
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.
Summary
git 2.56 answers
-hwith its usage and exit 0; earlier releases exited 129.rtk git logtook an exit code of 128 or more to mean git refused the walk, so on 2.56rtk git log -hpran the cap probe after the usage text, the probe got the usage again and read it as commits left over, and[rtk] capped at 10 commits; pass -n <count> for morewas appended under git's usage.A
-hflag, alone or in a cluster, now counts as a walk that never ran. Only a flag token counts:--grep -hand-- -hstill run the walk and still get the notice.This is what turns
a_clustered_h_is_answered_by_git_oncered on the macOS and Windows runners that moved to git 2.56 (2.55 jobs still pass), so open PRs fail or pass depending on which runner image they land on.Test plan
a_short_h_asks_for_usage_but_a_value_or_pathspec_does_not; fails with the check disableda_clustered_h_is_answered_by_git_oncerun against git 2.56.0 (alpine:edge): fails without the change with the same output as CI, passes with itcargo fmt --all --check,cargo clippy --all-targets,cargo test --all🤖 Generated with Claude Code