Skip to content

Support multi-branch CLI comparisons#49

Merged
dastratakos merged 4 commits into
mainfrom
dastratakos/multi-branch-args
May 24, 2026
Merged

Support multi-branch CLI comparisons#49
dastratakos merged 4 commits into
mainfrom
dastratakos/multi-branch-args

Conversation

@dastratakos
Copy link
Copy Markdown
Contributor

@dastratakos dastratakos commented May 23, 2026

Summary

Add diffity-style git ref arguments to the stagereview CLI so users can prepare and view chapter runs for branch, tag, and range comparisons.

Changes

  • Added positional refs and --compare handling to prep and show.
  • Resolved two-ref and range comparisons through merge-base while preserving existing working-tree scopes.
  • Updated README and stage-chapters skill docs, with git-level coverage for branch comparisons.

Testing

pnpm lint; pnpm typecheck; pnpm test; pnpm build


Open in Stage

@stage-review
Copy link
Copy Markdown

stage-review Bot commented May 23, 2026

Ready to review this PR? Stage has broken it down into 5 individual chapters for you:

Title
1 Build multi-ref scope resolution in git utilities
2 Thread multi-ref options through the prep command
3 Thread multi-ref options through the show command
4 Expose positional refs and --compare flag in CLI commands
5 Test multi-ref resolution and update documentation
Open in Stage

Chapters generated by Stage for commit 946bddf on May 23, 2026 4:48pm UTC.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for comparing arbitrary git references using positional arguments, range syntax (e.g., main..feature), and a new --compare flag across the prep and show commands. The core logic in packages/cli/src/git.ts has been refactored to resolve merge bases and SHAs for these comparisons, supported by new unit tests and updated documentation. Feedback suggests improving the range parsing to allow omitting one side of a range (e.g., ..feature), defaulting to HEAD to better align with standard git behavior.

Comment thread packages/cli/src/git.ts Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 903de81. Configure here.

Comment thread packages/cli/src/git.ts
@dastratakos dastratakos marked this pull request as ready for review May 24, 2026 03:24
@dastratakos dastratakos merged commit e408213 into main May 24, 2026
4 checks passed
@dastratakos dastratakos deleted the dastratakos/multi-branch-args branch May 24, 2026 03:39
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