apteryx pushed a commit to branch master
in repository guix.
commit 24396e8327d02f46e50b58a31545f26e21be5425
Author: Tomas Volf <[email protected]>
AuthorDate: Tue Apr 1 00:10:19 2025 +0200
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 <[email protected]>
---
doc/guix.texi | 3 +++
gnu/services/version-control.scm | 10 +++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 2d48ef5cbe..3f38c11027 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -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
diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index 1e21174ea9..e73e77e0b2 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -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