]> source.dussan.org Git - gitea.git/commit
Rewrite of the LFS server (#15523)
authorKN4CK3R <admin@oldschoolhack.me>
Sat, 5 Jun 2021 23:59:27 +0000 (01:59 +0200)
committerGitHub <noreply@github.com>
Sat, 5 Jun 2021 23:59:27 +0000 (02:59 +0300)
commitee5e1c4a88f2f075587bfbc39438b6d6b1c3044e
tree5953d6094edeaa0ff65209ead9cc7a3ad6d753dc
parent683cfe39ef2c03f204eb558ba6ec65c2b18b9433
Rewrite of the LFS server (#15523)

* Restructured code. Moved static checks out of loop.

* Restructured batch api. Add support for individual errors.

* Let router decide if LFS is enabled.

* Renamed methods.

* Return correct status from verify handler.

* Unified media type check in router.

* Changed error code according to spec.

* Moved checks into router.

* Removed invalid v1 api methods.

* Unified methods.

* Display better error messages.

* Added size parameter. Create meta object on upload.

* Use object error on invalid size.

* Skip upload if object exists.

* Moved methods.

* Suppress fields in response.

* Changed error on accept.

* Added tests.

* Use ErrorResponse object.

* Test against message property.

* Add support for the old invalid lfs client.

* Fixed the check because MinIO wraps the error.

* Use individual repositories.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
integrations/api_repo_lfs_locks_test.go
integrations/api_repo_lfs_test.go [new file with mode: 0644]
integrations/lfs_getobject_test.go
modules/lfs/shared.go
routers/routes/web.go
services/lfs/locks.go
services/lfs/server.go