Repository navigation
Fix inline --diff ref handling - #2
Merged
Merged
Conversation
parseArgs ignored --diff=<ref> because it only looked at the next argv entry. Honour the inline value while keeping --diff [ref] and bare --diff unchanged. Added test/cli.test.js and updated README/CHANGELOG. AI disclosure: I used OpenCode hy4-flash-free to inspect the parser, draft the fix and tests, and write this message. I opened issue #1 first, ran every test file locally (33 passing), and verified the change myself.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Closes #1.
parseArgs()supported inline values (--format=json,--budget=100) for every option except--diff. The--diffbranch only looked atargv[i + 1], so--diff=mainsilently became--diff HEAD.This honours the inline value when present, while keeping
--diff mainand bare--diffunchanged. Addedtest/cli.test.js, and updated the README option table andCHANGELOG.md.How tested
node --test test/cli.test.js→ 5/5 pass (inline, separate, bare, flag-following, other inline flags).node --teston Windows / Node 24.15.0 → 33 passing, 0 failing acrosscli,gitignore,glob,pack,redact,tokens.npm testitself crashes in this environment with Node 24's "Releasing the double mapped memory failed" before running tests; running the files directly works and avoids that wrapper issue.AI use is disclosed in the commit message: OpenCode hy4-flash-free helped inspect the parser and draft the change and tests; I opened the issue first, ran the tests, and reviewed the diff.