diff options
author | Philip Peterson <philip-peterson@users.noreply.github.com> | 2023-03-13 00:51:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-13 15:51:07 +0800 |
commit | 757b4c17e900f1d11a81bc9467d90e6c245ee8f2 (patch) | |
tree | d73ad5cfdcd0b7db80ee26461b946f68223e7fb8 /modules/setting/git.go | |
parent | f521e88240a2d5dd41ee42d78b96fc89309f1790 (diff) | |
download | gitea-757b4c17e900f1d11a81bc9467d90e6c245ee8f2.tar.gz gitea-757b4c17e900f1d11a81bc9467d90e6c245ee8f2.zip |
Support reflogs (#22451)
This PR adds support for reflogs on all repositories. It does this by
adding a global configuration entry.
Implements #14865
---------
Signed-off-by: Philip Peterson <philip.c.peterson@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/setting/git.go')
-rw-r--r-- | modules/setting/git.go | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/modules/setting/git.go b/modules/setting/git.go index 457b35936e..b8e7bb9cf8 100644 --- a/modules/setting/git.go +++ b/modules/setting/git.go @@ -12,9 +12,13 @@ import ( // Git settings var Git = struct { - Path string - HomePath string - DisableDiffHighlight bool + Path string + HomePath string + DisableDiffHighlight bool + Reflog struct { + Enabled bool + Expiration int + } `ini:"git.reflog"` MaxGitDiffLines int MaxGitDiffLineCharacters int MaxGitDiffFiles int @@ -37,6 +41,13 @@ var Git = struct { GC int `ini:"GC"` } `ini:"git.timeout"` }{ + Reflog: struct { + Enabled bool + Expiration int + }{ + Enabled: true, + Expiration: 90, + }, DisableDiffHighlight: false, MaxGitDiffLines: 1000, MaxGitDiffLineCharacters: 5000, |