You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: After switching the default branch, other branches are still compared against the old default branch due to outdated divergence cache.
Change: Clear the divergence cache in SetRepoDefaultBranch to ensure correct comparisons against the new default branch.
Fixesgo-gitea#34369
GWDx
linked a pull request
May 5, 2025
that will
close
this issue
Issue: After switching the default branch, other branches are still compared against the old default branch due to outdated divergence cache.
Change: Clear the divergence cache in SetRepoDefaultBranch to ensure correct comparisons against the new default branch.
Fixesgo-gitea#34369
Description
Steps to reproduce
b1
(default) - 1 unique commitb2
- 2 unique commitsb3
- 3 unique commits(All branches share the same base commit)
b1
is the remote default branchCheck branch divergence at: https://gitea.com/GWDx/bug-branch-divergence/branches
Navigate to repository settings: https://gitea.com/GWDx/bug-branch-divergence/settings/branches
Switch default branch to
b2
Re-check branch comparisons at: https://gitea.com/GWDx/bug-branch-divergence/branches
Results
Step 2: With
b1
as default branch, all branch comparisons work as expected.Step 4: After switching default branch to
b2
,b1
correctly compares againstb2
(new default)b3
still incorrectly compares againstb1
(old default)Expected Behavior
b3
should calculate divergence againstb2
(current default)Gitea Version
1.23.7
Can you reproduce the bug on the Gitea demo site?
Not yet. When executing Step 2, Gitea demo site seems down, returning HTTP 500.
Log Gist
No response
Screenshots
No response
Git Version
2.39.5
Operating System
Debian bookworm 6.1.0-34-amd64
How are you running Gitea?
I have validated this issue across multiple deployment methods:
Database
SQLite
The text was updated successfully, but these errors were encountered: