-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behaviors of the Sync Fork feature #33145
Comments
How did you reproduce this? Or can you reproduce this on the demo site? |
Hi Lunny, I reproduced in demo site as follows, you can check the behavior, which can be divided into 2 problems. Problem 1 - no fork info when the forked branch is updated and the latest
Problem 2 - Continue 6. Update base branch will no longer show
I suggest fixing the inconsistent behavior of the fork feature, caused by the current |
Fixes go-gitea#33145 An integration test could be added. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Description
There is a known issue that, when in a forked repository, we use
GetUpstreamDivergingInfo->GetDivergingCommits
to see if the forked branch needs to be synced.However the
GetDivergingCommits
will not work completely (return code 128 when the forked branch is updated) because the forked branch does not have the reference tree of the base branch in the repo path. Results in some scenarios, theSync fork
button is not shown as expected.I would like to work on this issue, and the following is my fix design:
modules/git/repo_compare.go
'sGetCompareInfo
, implement a temporary remote for the forked branch to make thegit rev-list
work.rev-list
for the forked branch and base branch is much alike a pull request without listing the file changes but getting the summary of the commit change.This issue is related to #32769, if this is fixed, the improved
GetDivergingCommits
could help the other issue.Gitea Version
34dfc25
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
dev container from ubuntu22.04
Database
SQLite
The text was updated successfully, but these errors were encountered: