Compare a merged base and a failed compare call in the review bundle

Open
#682 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@Alan52254 is already working on this.

Since Nov 13, 2026.

Assessment

This issue has not been assessed yet.

Description

The rewrite comparison that #605 adds to review-bundle.sh reads a rebase or an amend through a tree diff and a range-diff. Three cases came up in review and were left out of that change on purpose, so it stays at what #587 asked for.

  1. A head whose compare status is merged (Update branch, or a hand merge of the base) still gets the whole diff. Accepting it needs a check that the merge brought in only the base, so a merge of some other branch is not reported as rewritten.
  2. When the compare call fails but the clone already holds the old head as an ancestor with no merge commits, git diff old head gives the ahead answer locally instead of falling back to the whole diff.
  3. A status of unknown over a merged history should give the same answer as merged, and the order in which compare_why picks its reason for it should be fixed in one place.

Acceptance:

  • one test per cell of the status matrix (ahead, behind, diverged, merged, unknown) crossed with --since-base given or not, and with the fetch, the merge-base or the range-diff step failing;
  • each fallback names its reason in the manifest since.why and in SKILL.md;
  • the helper that gives up on a comparison is the single place that sets the reason.
Dominant language
Rust
Stars
236
Forks
153
Avg merge
1d 9h
Merged PRs (30d)
187

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sysprog21/codetrial

All issues in sysprog21/codetrial

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.