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/modules/repository
wxiaoguang 83df0caf15
Sync gitea app path for git hooks and authorized keys when starting (#17335)
Gitea writes its own AppPath into git hook scripts. If Gitea's AppPath changes, then the git push will fail.

This PR:

* Introduce an AppState module, it can persist app states into database
* During GlobalInit, Gitea will check if the current AppPath is the same as last one. If they don't match, Gitea will sync git hooks.
* Refactor some code to make them more clear.
* Also, "Detect if gitea binary's name changed" #11341 is related, we call models.RewriteAllPublicKeys to update ssh authorized_keys file
3 years ago
..
adopt.go Ensure that git daemon export ok is created for mirrors (#17243) 3 years ago
archive.go Fix archive error when rename repo or user (#16399) 3 years ago
branch.go [API] Add pagination to ListBranches (#14524) 3 years ago
cache.go Make commit info cancelable (#16032) 3 years ago
check.go DBContext is just a Context (#17100) 3 years ago
commits.go Avatar refactor, move avatar code from `models` to `models.avatars`, remove duplicated code (#17123) 3 years ago
commits_test.go Move db related basic functions to models/db (#17075) 3 years ago
create.go Ensure that git daemon export ok is created for mirrors (#17243) 3 years ago
create_test.go Move db related basic functions to models/db (#17075) 3 years ago
fork.go Ensure that git daemon export ok is created for mirrors (#17243) 3 years ago
fork_test.go Move db related basic functions to models/db (#17075) 3 years ago
generate.go Ensure that git daemon export ok is created for mirrors (#17243) 3 years ago
hooks.go Sync gitea app path for git hooks and authorized keys when starting (#17335) 3 years ago
init.go DBContext is just a Context (#17100) 3 years ago
main_test.go Move db related basic functions to models/db (#17075) 3 years ago
push.go Fix a bug on refactoring (#13373) 4 years ago
repo.go Ensure that git daemon export ok is created for mirrors (#17243) 3 years ago
update.go DBContext is just a Context (#17100) 3 years ago