Skip to content

Reject invalid Git comparisons before launching the TUI - #85

Merged
sidkmenon merged 2 commits into
mainfrom
sm/err
Oct 5, 2026
Merged

sidkmenon merged 2 commits into
mainfrom
sm/err

Conversation

@sidkmenon

Copy link
Copy Markdown
Contributor

Invalid Git comparisons such as diffr HEAD^2..HEAD currently open the TUI before reporting the revision error. Validate the comparison before launching the frontend so invalid input prints an error to stderr and exits with code 2.

Adds a regression test for an invalid range and confirms a valid range still reaches the TUI.

Validation: cargo test -p diffr --test cli --test git_comparison and cargo fmt --all -- --check passed locally.

AI assistance: implemented and tested with OpenAI Codex.

@sidkmenon
sidkmenon enabled auto-merge (squash) October 5, 2026 07:38
@sidkmenon
sidkmenon disabled auto-merge October 5, 2026 07:54
AI assistance: implemented and tested with OpenAI Codex.

Agent-Session: b7f96806-2bcb-4ee8-aca4-c5bedad0939a
Agent-Session: 82924cb5-dcfa-42e4-abb0-ef40393249f8
Agent-Session: 01a10ad4-5daa-74b2-9479-9dca5e8b2572
Agent-Session: ea775653-fef8-47be-96ea-16815bdff22c
AI assistance: implemented and tested with OpenAI Codex.

Agent-Session: b7f96806-2bcb-4ee8-aca4-c5bedad0939a
Agent-Session: 82924cb5-dcfa-42e4-abb0-ef40393249f8
Agent-Session: 01a10ad4-5daa-74b2-9479-9dca5e8b2572
Agent-Session: ea775653-fef8-47be-96ea-16815bdff22c
@sidkmenon
sidkmenon merged commit 0c9f197 into main Oct 5, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant