gitea/routers/web/repo
Lunny Xiao 32b97b3ce8
Uniform all temporary directories and allow customizing temp path (#32352)
This PR uniform all temporary directory usage so that it will be easier
to manage.

Relate to #31792 

- [x] Added a new setting to allow users to configure the global
temporary directory.
- [x] Move all temporary files and directories to be placed under
os.Temp()/gitea.
- [x] `setting.Repository.Local.LocalCopyPath` now will be
`setting.TempPath/local-repo` and the customized path is removed.
```diff
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[repository.local]
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Path for local repository copy. Defaults to  TEMP_PATH + `local-repo`, this is deprecated and cannot be changed
-;LOCAL_COPY_PATH = local-repo
```

- [x] `setting.Repository.Upload.TempPath` now will be
`settting.TempPath/uploads` and the customized path is removed.
```diff
;[repository.upload]
-;;
-;; Path for uploads. Defaults to TEMP_PATH + `uploads`
-;TEMP_PATH = uploads
```

- [x] `setting.Packages.ChunkedUploadPath` now will be
`settting.TempPath/package-upload` and the customized path is removed.
```diff
;[packages]
-;;
-;; Path for chunked uploads. Defaults it's `package-upload` under `TEMP_PATH` unless it's an absolute path.
-;CHUNKED_UPLOAD_PATH = package-upload
```

- [x] `setting.SSH.KeyTestPath` now will be
`settting.TempPath/ssh_key_test` and the customized path is removed.
```diff
[server]
-;;
-;; Directory to create temporary files in when testing public keys using ssh-keygen,
-;; default is the system temporary directory.
-;SSH_KEY_TEST_PATH =
```

TODO:
- [ ] setting.PprofDataPath haven't been changed because it may need to
be kept until somebody read it but temp path may be clean up any time.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-08 16:15:28 +00:00
..
actions Fix markdown render behaviors (#34122) 2025-04-05 11:56:48 +08:00
setting Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
activity.go Do not show 500 error when default branch doesn't exist (#34096) 2025-04-01 21:39:00 -07:00
attachment.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
blame.go Add file tree to file view page (#32721) 2025-03-15 16:26:49 +08:00
branch.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
cherry_pick.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
code_frequency.go Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (#34053) 2025-03-28 21:04:40 -07:00
commit.go Don't create duplicated functions for code repositories and wiki repositories (#33924) 2025-03-19 11:17:19 -07:00
compare.go enable staticcheck QFxxxx rules (#34064) 2025-03-29 17:32:28 -04:00
contributors.go Fix incorrect ref commit ID usage (#33331) 2025-01-20 07:43:49 +00:00
download.go Refactor cache-control (#33861) 2025-03-13 07:04:50 +08:00
editor.go Refactor Branch struct in package modules/git (#33980) 2025-04-02 17:31:32 +00:00
editor_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
find.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
fork.go Check user/org repo limit instead of doer (#34147) 2025-04-07 23:45:31 -07:00
githttp.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
githttp_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
helper.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
issue.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
issue_comment.go Move git references checking to gitrepo packages to reduce expose of repository path (#33891) 2025-03-15 19:48:59 -07:00
issue_content_history.go enable staticcheck QFxxxx rules (#34064) 2025-03-29 17:32:28 -04:00
issue_dependency.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
issue_label.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
issue_label_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
issue_list.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
issue_lock.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue_new.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
issue_page_meta.go Fix PR's target branch dropdown (#33589) 2025-02-14 05:21:31 +00:00
issue_pin.go Move issue pin to an standalone table for querying performance (#33452) 2025-02-17 11:28:37 -08:00
issue_poster.go Support public code/issue access for private repositories (#33127) 2025-01-14 01:53:34 +00:00
issue_stopwatch.go Prepare common tmpl functions in a middleware (#33957) 2025-03-25 06:17:58 +00:00
issue_suggestions.go Rework suggestion backend (#33538) 2025-02-10 16:24:05 +00:00
issue_test.go
issue_timetrack.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
issue_view.go Fix markdown render behaviors (#34122) 2025-04-05 11:56:48 +08:00
issue_watch.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
middlewares.go Refactor context repository (#33202) 2025-01-12 03:39:46 +00:00
migrate.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
milestone.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
packages.go Refactor context repository (#33202) 2025-01-12 03:39:46 +00:00
patch.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
projects.go Allow filtering issues by any assignee (#33343) 2025-03-21 04:25:36 +00:00
projects_test.go Clarify path param naming (#32969) 2024-12-24 13:47:45 +00:00
pull.go Auto expand "New PR" form (#33971) 2025-03-24 14:28:02 +00:00
pull_review.go enable staticcheck QFxxxx rules (#34064) 2025-03-29 17:32:28 -04:00
pull_review_test.go Refactor older tests to use testify (#33140) 2025-01-09 09:21:47 +08:00
recent_commits.go Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (#34053) 2025-03-28 21:04:40 -07:00
release.go Move git references checking to gitrepo packages to reduce expose of repository path (#33891) 2025-03-15 19:48:59 -07:00
release_test.go Validate that the tag doesn't exist when creating a tag via the web (#33241) 2025-01-14 09:27:35 +08:00
render.go Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
repo.go Check user/org repo limit instead of doer (#34147) 2025-04-07 23:45:31 -07:00
search.go Improve issue & code search (#33860) 2025-03-13 11:07:48 +08:00
star.go Refactor web route handler (#33488) 2025-02-05 02:14:03 +08:00
topic.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
transfer.go Refactor web route handler (#33488) 2025-02-05 02:14:03 +08:00
treelist.go Keep file tree view icons consistent with icon theme (#33921) 2025-04-06 19:35:08 +00:00
view.go Keep file tree view icons consistent with icon theme (#33921) 2025-04-06 19:35:08 +00:00
view_file.go Fix markdown render behaviors (#34122) 2025-04-05 11:56:48 +08:00
view_home.go Correctly handle submodule view and avoid throwing 500 error (#34121) 2025-04-06 09:38:08 +00:00
view_home_test.go Correctly handle submodule view and avoid throwing 500 error (#34121) 2025-04-06 09:38:08 +00:00
view_readme.go Keep file tree view icons consistent with icon theme (#33921) 2025-04-06 19:35:08 +00:00
view_test.go
watch.go Refactor web route handler (#33488) 2025-02-05 02:14:03 +08:00
webgit.go Support choose email when creating a commit via web UI (more) (#33445) 2025-01-31 02:36:18 +00:00
wiki.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
wiki_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00