1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-01-03 14:57:55 -05:00
Commit Graph

5 Commits

Author SHA1 Message Date
Jason Song
7a2daae7c3
Sync git hooks when config file path changed () ()
Backport  .

A patch to .

Just like AppPath, Gitea writes its own CustomConf into git hook scripts
too. If Gitea's CustomConf changes, then the git push may fail.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2022-10-30 11:16:09 +08:00
Lunny Xiao
b8911fb456
Use a struct as test options ()
* Use a struct as test options

* Fix name

* Fix test
2022-04-14 21:58:21 +08:00
6543
54e9ee37a7
format with gofumpt ()
* gofumpt -w -l .

* gofumpt -w -l -extra .

* Add linter

* manual fix

* change make fmt
2022-01-20 18:46:10 +01:00
wxiaoguang
df64fa4865
Decouple unit test code from business code () 2021-11-12 22:36:47 +08:00
wxiaoguang
83df0caf15
Sync gitea app path for git hooks and authorized keys when starting ()
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"  is related, we call models.RewriteAllPublicKeys to update ssh authorized_keys file
2021-10-21 17:22:43 +08:00