Skip to content

docs: TODO deferred merge-stats split and squash-preview coverage - #3563

Merged
max-sixty merged 1 commit into
mainfrom
add-deferred-todos
Jul 24, 2026
Merged

docs: TODO deferred merge-stats split and squash-preview coverage#3563
max-sixty merged 1 commit into
mainfrom
add-deferred-todos

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Summary

Follow-ups from #3549 (the stale-local-ref fix, fixing #3519), recorded as inline TODOs rather than a separate tracking issue:

  • src/commands/worktree/push.rs: MergeContext::prepare's commit_count mixes carried fast-forwarded upstream commits with the branch's own squash commit when the target was behind its upstream, so the merge success line ("Merged to main (N commits, ...)") overstates the branch's own contribution. Splitting it needs a carried-count threaded through MergeContext — deferred as cosmetic.
  • src/commands/step/squash.rs: preview_squash (backing --dry-run/--show-prompt) shares the upstream-measured base with handle_squash, but only the mutating path has a test asserting it (test_step_squash_measures_against_upstream_when_local_main_stale). A snapshot test pinning the preview output in the same stale topology would close this gap.

No behavior changes — comments only.

Test plan

  • cargo check
  • cargo clippy --all-targets
  • cargo fmt --check

🤖 Generated with Claude Code

This was written by Claude Code on behalf of Maximilian Roos

Records two follow-ups from PR #3549 (the stale-local-ref fix) as
inline TODOs rather than a separate tracking issue: splitting the
merge success line's commit count into carried-vs-own commits, and
adding a snapshot test for `wt step squash --dry-run`/`--show-prompt`
in the stale-upstream topology.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@max-sixty
max-sixty merged commit e2b9563 into main Jul 24, 2026
39 checks passed
@max-sixty
max-sixty deleted the add-deferred-todos branch July 24, 2026 01:36
@worktrunk-bot worktrunk-bot mentioned this pull request Jul 24, 2026
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.

2 participants