-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix IsObjectExist
with gogit
#31790
Fix IsObjectExist
with gogit
#31790
Conversation
Commit the test change first since I want to check if the unit tests could find that. Weird, it's not what happened on my local env with Wait for #31791 Here it is ~ |
Found at #31790 (comment) `unit-tests-gogit` never work since the workflow set `TAGS` with `gogit`, but the Makefile use `TEST_TAGS`. This PR adds the values of `TAGS` to `TEST_TAGS`, ensuring that setting `TAGS` is always acceptable and avoiding confusion about which one should be set.
Found at go-gitea#31790 (comment) `unit-tests-gogit` never work since the workflow set `TAGS` with `gogit`, but the Makefile use `TEST_TAGS`. This PR adds the values of `TAGS` to `TEST_TAGS`, ensuring that setting `TAGS` is always acceptable and avoiding confusion about which one should be set.
) Backport #31791 by @wolfogre Found at #31790 (comment) `unit-tests-gogit` never work since the workflow set `TAGS` with `gogit`, but the Makefile use `TEST_TAGS`. <img width="690" alt="image" src="https://github.com/user-attachments/assets/fb68df49-952b-42b9-8438-44200cefff43"> ![image](https://github.com/user-attachments/assets/78ff88c7-3b5f-4d50-9c58-e607bf7b1a71) This PR adds the values of `TAGS` to `TEST_TAGS`, ensuring that setting `TAGS` is always acceptable and avoiding confusion about which one should be set. After this PR: <img width="714" alt="image" src="https://github.com/user-attachments/assets/54cc7f38-d95b-4dbc-a87c-daba63462b86"> Co-authored-by: Jason Song <[email protected]>
I noticed that there are more inconsistent behaviors between gogit and nogogit editions. I know there's some reason that Gitea should use gogit for Windows platform, but it could be a really heavy maintenance work. Maybe Gitea should give up the support to Windows platform like Gitlab. Otherwise, here is the drama story:
|
Agree with removing native Windows support. Windows users can and should run gitea in docker instead. Doing so would also remove a ton of cruft in the code base, like the hacky Windows service code. BTW I would also remove gogit. |
Maybe #31754 can resolve some problems when running native nongogit windows Gitea. |
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.
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. Co-authored-by: Jason Song <[email protected]>
* giteaofficial/main: Show lock owner instead of repo owner on LFS setting page (go-gitea#31788) Move repository visibility to danger zone in the settings area (go-gitea#31126) [skip ci] Updated translations via Crowdin Add types to various low-level functions (go-gitea#31781) Add warning message in merge instructions when `AutodetectManualMerge` was not enabled (go-gitea#31805) Show latest run when visit /run/latest (go-gitea#31808) Fix typo for `LOG_COMPRESSION` in ini (go-gitea#31809) Add label `docs-update-needed` for PRs that modify `app.example.ini` (go-gitea#31810) Fix `IsObjectExist` with gogit (go-gitea#31790) Support compression for Actions logs (go-gitea#31761) Add issue comment when moving issues from one column to another of the project (go-gitea#29311) [skip ci] Updated translations via Crowdin Fix RPM resource leak (go-gitea#31794)
Fix #31271.
When gogit is enabled,
IsObjectExist
callsrepo.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.