gitea/models
zeripath 296814e887 Refactor editor upload, update and delete to use git plumbing and add LFS support ()
* Use git plumbing for upload:  repo_editor.go: UploadRepoFile

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

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

* Use git plumbing for upload:  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 

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>
..
fixtures Add option to close issues via commit on a non master branch ()
migrations Add option to close issues via commit on a non master branch ()
access.go Restrict permission check on repositories and fix some problems ()
access_test.go Restrict permission check on repositories and fix some problems ()
action.go Add option to close issues via commit on a non master branch ()
action_list.go
action_test.go Add option to close issues via commit on a non master branch ()
admin.go
admin_test.go
attachment.go Added URL mapping for Release attachments like on github.com ()
attachment_test.go
branches.go fix log output ()
branches_test.go
consistency.go
error.go Pull request review/approval and comment on code ()
error_oauth2.go
external_login_user.go
git_diff.go Fix regex to support optional end line of old section in diff hunk ()
git_diff_test.go Pull request review/approval and comment on code ()
gpg_key.go Fix null pointer dereference in ParseCommitWithSignature ()
gpg_key_test.go
graph.go
graph_test.go
helper.go
issue.go Add the ability to use multiple labels as filters()
issue_assignees.go Fix sqlite deadlock when assigning to a PR ()
issue_assignees_test.go Improve performance of dashboard ()
issue_comment.go support reviewing on a deleted file path ()
issue_comment_list.go Improve performance of dashboard ()
issue_comment_test.go Pull request review/approval and comment on code ()
issue_dependency.go fix sqlite lock ()
issue_dependency_test.go Fix an error while adding a dependency via UI. ()
issue_indexer.go Refactor notification for indexer ()
issue_label.go Add label names as filter in issue search api ()
issue_label_test.go Add label names as filter in issue search api ()
issue_list.go
issue_list_test.go
issue_mail.go Also ensure the repo is loaded ()
issue_milestone.go Milestone issues and pull requests ()
issue_milestone_test.go
issue_reaction.go
issue_reaction_test.go Ensure valid git author names passed in signatures ()
issue_stopwatch.go Improve performance of dashboard ()
issue_stopwatch_test.go
issue_test.go Add option to close issues via commit on a non master branch ()
issue_tracked_time.go Improve performance of dashboard ()
issue_tracked_time_test.go
issue_user.go Fix sqlite deadlock when assigning to a PR ()
issue_user_test.go
issue_watch.go
issue_watch_test.go
lfs.go Refactor editor upload, update and delete to use git plumbing and add LFS support ()
lfs_lock.go Restrict permission check on repositories and fix some problems ()
login_source.go Only allow local login if password is non-empty ()
mail.go Improve performance of dashboard ()
main_test.go
models.go Added test environment for mssql ()
models_sqlite.go
models_test.go
notification.go Fix sqlite lock ()
notification_test.go
oauth2.go Discord Oauth2 support ()
org.go Feature - - search for org repos ()
org_team.go Config option to disable automatic repo watching ()
org_team_test.go api: Add missing GET teams endpoints ()
org_test.go Restrict permission check on repositories and fix some problems ()
pull.go Pull request conflict files detection ()
pull_test.go Disable merging a WIP Pull request ()
release.go Added URL mapping for Release attachments like on github.com ()
release_test.go mirror: Delete tags in mirror which are removed for original repo. ()
repo.go Add option to close issues via commit on a non master branch ()
repo_activity.go
repo_branch.go Refactor editor upload, update and delete to use git plumbing and add LFS support ()
repo_collaboration.go
repo_collaboration_test.go
repo_indexer.go
repo_issue.go
repo_list.go This commit will reduce join star, repo_topic, topic tables on repo search, so that fix extra columns problem on mssql ()
repo_list_test.go This commit will reduce join star, repo_topic, topic tables on repo search, so that fix extra columns problem on mssql ()
repo_mirror.go Add option to disable automatic mirror syncing. ()
repo_permission.go Restrict permission check on repositories and fix some problems ()
repo_permission_test.go Restrict permission check on repositories and fix some problems ()
repo_redirect.go
repo_redirect_test.go
repo_tag.go Add API to list tags ()
repo_test.go
repo_unit.go Add rebase with merge commit merge style () ()
repo_watch.go Fix sqlite deadlock when assigning to a PR ()
repo_watch_test.go
review.go Webhook for Pull Request approval/rejection ()
review_test.go Show review summary in pull requests ()
ssh_key.go Fix ssh deploy and user key constraints () ()
ssh_key_test.go
star.go Ensure that sessions are passed into queries that could use the database to prevent deadlocks ()
star_test.go
status.go Fix race on updatesize ()
status_test.go
test_fixtures.go Increase the retry limit to 20 times and the interval to 200ms ()
token.go
token_test.go
topic.go fix topic name length on database ()
topic_test.go feat(repo): support search repository by topic name ()
twofactor.go
u2f.go
u2f_test.go
unit.go Fix create team, update team missing units ()
unit_tests.go User action heatmap ()
update.go Improve performance of dashboard ()
update_test.go
upload.go Refactor editor upload, update and delete to use git plumbing and add LFS support ()
user.go Fix empty ssh key importing in ldap ()
user_follow.go
user_follow_test.go
user_heatmap.go Only count users own actions for heatmap contributions ()
user_heatmap_test.go Fix JSON result of empty array ()
user_mail.go
user_mail_test.go
user_openid.go Fix SQL quoting ()
user_openid_test.go
user_test.go Don't discard the value of DISABLE_REGULAR_ORG_CREATION ()
webhook.go Webhook for Pull Request approval/rejection ()
webhook_dingtalk.go Webhook for Pull Request approval/rejection ()
webhook_discord.go Webhook for Pull Request approval/rejection ()
webhook_slack.go handle milestone events for issues and PR ()
webhook_test.go
wiki.go Fix serving of raw wiki files other than .md ()
wiki_test.go