Skip to content

Conversation

@GiteaBot
Copy link
Collaborator

@GiteaBot GiteaBot commented Aug 9, 2024

Backport #31790 by @wolfogre

Fix #31271.

When gogit is enabled, IsObjectExist calls repo.gogitRepo.ResolveRevision, which is not correct. It's for checking references not objects, it could work with commit hash since it's both a valid reference and a commit object, but it doesn't work with blob objects.

So it causes #31271 because it reports that all blob objects do not exist.

Fix go-gitea#31271.

When gogit is enabled, `IsObjectExist` calls
`repo.gogitRepo.ResolveRevision`, which is not correct. It's for
checking references not objects, it could work with commit hash since
it's both a valid reference and a commit object, but it doesn't work
with blob objects.

So it causes go-gitea#31271 because it reports that all blob objects do not
exist.
@GiteaBot GiteaBot added issue/critical This issue should be fixed ASAP. If it is a PR, the PR should be merged ASAP modifies/go Pull requests that update Go code type/bug labels Aug 9, 2024
@GiteaBot GiteaBot added this to the 1.22.2 milestone Aug 9, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 9, 2024
@GiteaBot GiteaBot requested review from lafriks and lunny August 9, 2024 02:40
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 9, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 9, 2024
@wolfogre wolfogre merged commit 144648a into go-gitea:release/v1.22 Aug 9, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

issue/critical This issue should be fixed ASAP. If it is a PR, the PR should be merged ASAP lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants