Compare dropdown fails when selecting branch with no common merge-base (#37470)#37472
Compare dropdown fails when selecting branch with no common merge-base (#37470)#37472bircni wants to merge 5 commits intogo-gitea:release/v1.26from
Conversation
…sons - Introduced `ErrNoMergeBase` type to handle cases where two branches do not share a common merge base. - Updated `MergeBase` function to return this error type when applicable. - Enhanced the compare functionality to display a warning message in the UI when no common merge base is found. - Added tests to verify behavior when comparing branches with no common history. - Updated locale file to include a message for the no common history scenario.
Co-Authored-By: Codex <codex@openai.com>
|
PR title should be same as original title on backports (it goes into changelog) |
|
Not sure what the changeset here is but it seems vastly different than #37470. |
Must fix1. Nil-pointer panic in 2. Should fix3. Test helper duplication. Optional4. Verify CI is green before merge. This comment was written with the help of Claude Opus 4.7. |
|
Well, here's Claude's verdict of this PR. |
|
|
||
| // ParseCompareInfo parse compare info between two commit for preparing comparing references | ||
| func ParseCompareInfo(ctx *context.Context) *git_service.CompareInfo { | ||
| func ParseCompareInfo(ctx *context.Context) (*git_service.CompareInfo, bool) { |
There was a problem hiding this comment.
Maybe this return value can be reverted, still use template variable to pass values between functions, to keep the changes minimal.
|
The PR's description is not for this PR either. |

Summary
Fixes #37469
Backport of: #37470