Closed
Description
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, the Sync fork
button is not shown as expected.
I would like to work on this issue, and the following is my fix design:
- By reference to
modules/git/repo_compare.go
'sGetCompareInfo
, implement a temporary remote for the forked branch to make thegit rev-list
work. - The
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