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.
forgejo/routers
zeripath 296814e887 Refactor editor upload, update and delete to use git plumbing and add LFS support (#5702)
* Use git plumbing for upload: #5621 repo_editor.go: UploadRepoFile

* Use git plumbing for upload: #5621 repo_editor.go: GetDiffPreview

* Use git plumbing for upload: #5621 repo_editor.go: DeleteRepoFile

* Use git plumbing for upload: #5621 repo_editor.go: UploadRepoFiles

* Move branch checkout functions out of repo_editor.go as they are no longer used there

* BUGFIX: The default permissions should be 100644

    This is a change from the previous code but is more in keeping
    with the default behaviour of git.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Standardise cleanUploadFilename to more closely match git

See verify_path in: 7f4e641693/read-cache.c (L951)

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Redirect on bad paths

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Refactor to move the uploading functions out to a module

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add LFS support

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update upload.go attribution header

Upload.go is essentially the remnants of repo_editor.go. The remaining code is essentially unchanged from the Gogs code, hence the Gogs attribution.

* Delete upload files after session committed

* Ensure that GIT_AUTHOR_NAME etc. are valid for git

see #5774

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add in test cases per @lafriks comment

* Add space between gitea and github imports

Signed-off-by: Andrew Thornton <art27@cantab.net>

* more examples in TestCleanUploadName

Signed-off-by: Andrew Thornton <art27@cantab.net>

* fix formatting

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Set the SSH_ORIGINAL_COMMAND to ensure hooks are run

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Switch off SSH_ORIGINAL_COMMAND

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago
..
admin fix #3200 (#6033) 5 years ago
api/v1 Fix #5799 - swagger for mergePullRequest (#5996) 5 years ago
dev Make time diff translatable (#2057) 7 years ago
org Improve team members and repositories settings UI (#5457) 6 years ago
private Fix ssh deploy and user key constraints (#1357) (#5939) 5 years ago
repo Refactor editor upload, update and delete to use git plumbing and add LFS support (#5702) 5 years ago
routes Allow Macaron to be set to log through to gitea.log (#5667) 5 years ago
user Feature - #3031 - search for org repos (#5986) 5 years ago
utils Slack webhook channel name cannot be empty or just contain an hashtag (#4786) 6 years ago
home.go feat(repo): support search repository by topic name (#4505) 6 years ago
init.go Ensure error is logged on db reconnection attempts (#5780) 6 years ago
install.go Remove traces of embedded TiDB (#4906) 6 years ago
metrics.go Fix metrics auth token detection (#6006) 5 years ago
swagger_json.go Swagger.v1.json template (#3572) 6 years ago