GNU bug report logs -
#31277
[PATCH] cgit changes
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Thu, 26 Apr 2018 21:15:01 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 31277 <at> debbugs.gnu.org (full text, mbox):
Instead of having the service manage the list, it's useful to be able to point
this at an existing file, for example, when using cgit together with gitolite.
* gnu/services/cgit.scm (project-list?): New procedure.
(serialize-project-list): Handle string values.
(<cgit-configuration>): Change the predicate for project-list to allow lists
and strings.
---
gnu/services/cgit.scm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gnu/services/cgit.scm b/gnu/services/cgit.scm
index bacd6ca16..240d4d8d9 100644
--- a/gnu/services/cgit.scm
+++ b/gnu/services/cgit.scm
@@ -115,6 +115,10 @@
(define (serialize-file-object field-name val)
(serialize-string field-name val))
+(define (project-list? val)
+ (or (list? val)
+ (string? val)))
+
;;;
;;; Serialize <nginx-server-configuration>
@@ -167,7 +171,9 @@
(if (null? val) ""
(serialize-field
'project-list
- (plain-file "project-list" (string-join val "\n")))))
+ (if (string? val)
+ val
+ (plain-file "project-list" (string-join val "\n"))))))
(define repository-directory? string?)
@@ -543,7 +549,7 @@ disabled.")
"Flag which, when set to @samp{#t}, will make cgit omit the standard
header on all pages.")
(project-list
- (list '())
+ (project-list '())
"A list of subdirectories inside of @code{repository-directory}, relative
to it, that should loaded as Git repositories. An empty list means that all
subdirectories will be loaded.")
--
2.17.0
This bug report was last modified 7 years ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.