mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-19 23:50:51 +00:00
Support changing git config through app.ini
, use diff.algorithm=histogram
by default (#24860)
Close #13454 , Close #23255, Close #14697 (and maybe more related issues) Many users have the requirement to customize the git config. This PR introduces an easy way: put the options in Gitea's app.ini `[git.config]`, then the config options will be applied to git config. And it can support more flexible default config values, eg: now `diff.algorithm=histogram` by default. According to: https://stackoverflow.com/a/32367597/4754037 , `histogram diff` is efficient and doesn't like to cause server-side problems. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
910bf31546
commit
8080ace6fc
7 changed files with 134 additions and 38 deletions
|
@ -282,6 +282,22 @@ Place custom files in corresponding sub-folder under `custom/options`.
|
|||
|
||||
To add custom .gitignore, add a file with existing [.gitignore rules](https://git-scm.com/docs/gitignore) in it to `$GITEA_CUSTOM/options/gitignore`
|
||||
|
||||
## Customizing the git configuration
|
||||
|
||||
Starting with Gitea 1.20, you can customize the git configuration via the `git.config` section.
|
||||
|
||||
### Enabling signed git pushes
|
||||
|
||||
To enable signed git pushes, set these two options:
|
||||
|
||||
```ini
|
||||
[git.config]
|
||||
receive.advertisePushOptions = true
|
||||
receive.certNonceSeed = <randomstring>
|
||||
```
|
||||
|
||||
`certNonceSeed` should be set to a random string and be kept secret.
|
||||
|
||||
### Labels
|
||||
|
||||
Starting with Gitea 1.19, you can add a file that follows the [YAML label format](https://github.com/go-gitea/gitea/blob/main/options/label/Advanced.yaml) to `$GITEA_CUSTOM/options/label`:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue