Repository navigation
Commit 90c6ffd
committed
fix: use main branch ref instead of merge-base for --head scan base
When --head is passed without --base, resolveBase() returned
merge-base(HEAD, origin/main) — a commit depending on the current
checkout. Passing that into a second merge-base with the target ref
could include unrelated main commits when HEAD is not the reviewed
branch.
Add resolveMainRef() that returns the branch ref name (origin/main or
main) so the --head path computes merge-base(origin/main, head)
directly, giving the correct fork point regardless of the local
checkout.1 parent 615fd9f commit 90c6ffd
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
479 | 489 | | |
480 | 490 | | |
481 | 491 | | |
| |||
513 | 523 | | |
514 | 524 | | |
515 | 525 | | |
516 | | - | |
| 526 | + | |
517 | 527 | | |
518 | 528 | | |
519 | 529 | | |
| |||
0 commit comments