neuropoly / gitea

https://gitea.io fork with https://git-annex.branchable.com support
https://gitea.io
MIT License
3 stars 2 forks source link

annex: enable during installation #29

Open kousu opened 1 year ago

kousu commented 1 year ago

https://docs.gitea.io/en-us/git-lfs-setup/ says Git LFS is disabled by default

[server]
; Enables git-lfs support. true or false, default is false.
LFS_START_SERVER = true

however, in practice, it's usually turned on, because the install page fills in this text field

Screenshot 2022-11-29 at 21-04-57 Gitea Git with a cup of tea

tracing The reason this is filled in by default is because it's initialized from `[lfs.PATH]` https://github.com/neuropoly/gitea/blob/fa43bce541507c8a702723f84764a48db9278506/routers/install/install.go#L122 and **that** is non-nil; according to https://docs.gitea.io/en-us/config-cheat-sheet/#lfs-lfs we have these defaults: ``` [lfs] STORAGE_TYPE = local PATH = ./data/lfs # if STORAGE_TYPE == local ``` and then on submit, it's read back in by https://github.com/neuropoly/gitea/blob/fa43bce541507c8a702723f84764a48db9278506/routers/install/install.go#L416-L418 which in turn turns on LFS_START_SERVER.

Anyway, this is an annoying inconsistency between LFS and annex, so add a checkbox to the install UI for git-annex, and leave it on by default to match the LFS behaviour.

kousu commented 1 year ago

(this didn't occur to me before because, for neurogitea, we're generating a app.ini ourselves and skipping the install UI entirely; so this isn't a high priority. but it would be good to polish this off)