mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
09b56fc069
Fix #31137. Replace #31623 #31697. When migrating LFS objects, if there's any object that failed (like some objects are losted, which is not really critical), Gitea will stop migrating LFS immediately but treat the migration as successful. This PR checks the error according to the [LFS api doc](https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#successful-responses). > LFS object error codes should match HTTP status codes where possible: > > - 404 - The object does not exist on the server. > - 409 - The specified hash algorithm disagrees with the server's acceptable options. > - 410 - The object was removed by the owner. > - 422 - Validation error. If the error is `404`, it's safe to ignore it and continue migration. Otherwise, stop the migration and mark it as failed to ensure data integrity of LFS objects. And maybe we should also ignore others errors (maybe `410`? I'm not sure what's the difference between "does not exist" and "removed by the owner".), we can add it later when some users report that they have failed to migrate LFS because of an error which should be ignored. |
6 months ago | |
---|---|---|
.. | ||
branch.go | 8 months ago | |
branch_test.go | 9 months ago | |
collaborator.go | 11 months ago | |
collaborator_test.go | 1 year ago | |
commits.go | 1 year ago | |
commits_test.go | 1 year ago | |
create.go | 11 months ago | |
create_test.go | 1 year ago | |
delete.go | 1 year ago | |
env.go | 9 months ago | |
fork.go | 1 year ago | |
hooks.go | 12 months ago | |
init.go | 11 months ago | |
init_test.go | 2 years ago | |
license.go | 1 year ago | |
license_test.go | 1 year ago | |
main_test.go | 1 year ago | |
push.go | 1 year ago | |
repo.go | 6 months ago | |
repo_test.go | 1 year ago | |
temp.go | 9 months ago |