1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

services: gitolite-git-configuration: Add extra-content field.

* gnu/services/version-control.scm (<gitolite-git-configuration>): Add
extra-content field.
(gitolite-git-configuration-compiler): Handle it during configuration file
generation.
* doc/guix.texi (Version Control Services): Document it.

Change-Id: Iceb02f60b8ef26138961aefef4e56ca83df0e19f
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
Tomas Volf
2025-04-01 00:10:19 +02:00
committed by Maxim Cournoyer
parent d4f3719a92
commit 24396e8327
2 changed files with 10 additions and 3 deletions

View File

@@ -41103,6 +41103,9 @@ values are @code{"master"} and @code{"main"}.
@item @code{receive-fsck-objects} (default: @code{#f})
If it is set to true, git-receive-pack will check all received objects.
@item @code{extra-content} (default: @code{""})
Extra content to add verbatim into the git configuration file.
@end table
@end deftp

View File

@@ -74,6 +74,7 @@
gitolite-git-configuration-email
gitolite-git-configuration-default-branch
gitolite-git-configuration-receive-fsck-objects
gitolite-git-configuration-extra-content
gitolite-service-type
@@ -339,12 +340,14 @@ access to exported repositories under @file{/srv/git}."
(default-branch gitolite-git-configuration-default-branch
(default #f))
(receive-fsck-objects gitolite-git-configuration-receive-fsck-objects
(default #f)))
(default #f))
(extra-content gitolite-git-configuration-extra-content
(default "")))
(define-gexp-compiler (gitolite-git-configuration-compiler
(config <gitolite-git-configuration>) system target)
(match-record config <gitolite-git-configuration>
(name email default-branch receive-fsck-objects)
(name email default-branch receive-fsck-objects extra-content)
(apply text-file* "gitconfig"
`("[user]\n"
"name = " ,name "\n"
@@ -356,7 +359,8 @@ access to exported repositories under @file{/srv/git}."
,@(if receive-fsck-objects
`("[receive]\n"
"fsckObjects = true\n")
'())))))
'())
,extra-content "\n"))))
(define-record-type* <gitolite-configuration>
gitolite-configuration make-gitolite-configuration