summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Volf <~@wolfsden.cz>2025-04-01 00:10:18 +0200
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-04-03 21:16:20 +0900
commitd4f3719a92d76434fb90f5f53bc407f2e2fb92e6 (patch)
tree600337c5d7c081107f381c7c9d152ca95de572c5
parent1f1a0e87731a62fdb0fb4d8c76485669b5e3af19 (diff)
services: gitolite-git-configuration: Add receive-fsck-objects field.
* gnu/services/version-control.scm (<gitolite-git-configuration>): Add receive-fsck-objects 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>
-rw-r--r--doc/guix.texi3
-rw-r--r--gnu/services/version-control.scm21
2 files changed, 17 insertions, 7 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 786eed525fb..2d48ef5cbe5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -41100,6 +41100,9 @@ Email used for commits (e.g. during setting up the admin repository).
If true, set the @code{init.defaultBranch} option to that value. Common
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.
+
@end table
@end deftp
diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index 12653b3cea0..1e21174ea91 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -73,6 +73,7 @@
gitolite-git-configuration-name
gitolite-git-configuration-email
gitolite-git-configuration-default-branch
+ gitolite-git-configuration-receive-fsck-objects
gitolite-service-type
@@ -331,17 +332,19 @@ access to exported repositories under @file{/srv/git}."
(define-record-type* <gitolite-git-configuration>
gitolite-git-configuration make-gitolite-git-configuration
gitolite-git-configuration?
- (name gitolite-git-configuration-name
- (default "GNU Guix"))
- (email gitolite-git-configuration-email
- (default "guix@localhost"))
- (default-branch gitolite-git-configuration-default-branch
- (default #f)))
+ (name gitolite-git-configuration-name
+ (default "GNU Guix"))
+ (email gitolite-git-configuration-email
+ (default "guix@localhost"))
+ (default-branch gitolite-git-configuration-default-branch
+ (default #f))
+ (receive-fsck-objects gitolite-git-configuration-receive-fsck-objects
+ (default #f)))
(define-gexp-compiler (gitolite-git-configuration-compiler
(config <gitolite-git-configuration>) system target)
(match-record config <gitolite-git-configuration>
- (name email default-branch)
+ (name email default-branch receive-fsck-objects)
(apply text-file* "gitconfig"
`("[user]\n"
"name = " ,name "\n"
@@ -349,6 +352,10 @@ access to exported repositories under @file{/srv/git}."
,@(if default-branch
`("[init]\n"
"defaultBranch = " ,default-branch "\n")
+ '())
+ ,@(if receive-fsck-objects
+ `("[receive]\n"
+ "fsckObjects = true\n")
'())))))
(define-record-type* <gitolite-configuration>