From 104f174e5ae0c43972f4aa387dcad9bcd4034288 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 28 May 2023 09:07:14 +0800 Subject: [PATCH] Use `[git.config]` for reflog cleaning up (#24958) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow https://github.com/go-gitea/gitea/pull/24860#discussion_r1200589651 Use `[git.config]` for reflog cleaning up, the new options are more flexible. * https://git-scm.com/docs/git-config#Documentation/git-config.txt-corelogAllRefUpdates * https://git-scm.com/docs/git-config#Documentation/git-config.txt-gcreflogExpire ## :warning: BREAKING The section `[git.reflog]` is now obsolete and its keys have been moved to the following replacements: - `[git.reflog].ENABLED` → `[git.config].core.logAllRefUpdates` - `[git.reflog].EXPIRATION` → `[git.config].gc.reflogExpire` --- doc/administration/config-cheat-sheet.en-us.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/administration/config-cheat-sheet.en-us.md b/doc/administration/config-cheat-sheet.en-us.md index 1fa4abce..10e6b927 100644 --- a/doc/administration/config-cheat-sheet.en-us.md +++ b/doc/administration/config-cheat-sheet.en-us.md @@ -1065,17 +1065,14 @@ Default templates for project boards: - `PULL`: **300**: Git pull from internal repositories timeout seconds. - `GC`: **60**: Git repository GC timeout seconds. -### Git - Reflog settings (`git.reflog`) - -- `ENABLED`: **true** Set to true to enable Git to write changes to reflogs in each repo. -- `EXPIRATION`: **90** Reflog entry lifetime, in days. Entries are removed opportunistically by Git. - ### Git - Config options (`git.config`) The key/value pairs in this section will be used as git config. This section only does "set" config, a removed config key from this section won't be removed from git config automatically. The format is `some.configKey = value`. - `diff.algorithm`: **histogram** +- `core.logAllRefUpdates`: **true** +- `gc.reflogExpire`: **90** ## Metrics (`metrics`)