Skip to content

Commit diff count is off for repos migrated from GitHub #20317

Closed
@harryzcy

Description

@harryzcy

Description

For releases that got migrated from GitHub, the commit diff between the tag and refs/heads/main is off for some releases. Compared to the actual diff, the count on Gitea is in short of 1. Also, the diff on specific release page is showing 0 instead of the correct value.

The issue seemly only happens when a release is tagged against refs/heads/main instead of main on GitHub, and then get migrated. It's also unclear if the existence of a draft release is linked to it. It needs further investigations.

Examples:

Releases listing page (/owner/repo/releases):
image

Specific release page (/owner/repo/releases/tag/tag_name):
image

The correct diff on GitHub:
image
image

Gitea Version

0c83944

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?

Built from source from 0c83944

Database

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions