From: Christopher Baines <mail@cbaines.net>
To: 31277@debbugs.gnu.org
Subject: [bug#31277] [PATCH 2/3] services: cgit: Improve handling of extra-options.
Date: Fri, 18 May 2018 11:23:38 +0100 [thread overview]
Message-ID: <20180518102339.26480-2-mail@cbaines.net> (raw)
In-Reply-To: <20180518102339.26480-1-mail@cbaines.net>
* gnu/services/cgit.scm (serialize-cgit-configuration): Add the extra options,
one per line, before the scan-path, as this makes it possible to use the
extra-options to affect the global behaviour for repositories.
(serialize-extra-options): New procedure.
---
gnu/services/cgit.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/services/cgit.scm b/gnu/services/cgit.scm
index 8ef12cd5a..3183535d4 100644
--- a/gnu/services/cgit.scm
+++ b/gnu/services/cgit.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -169,6 +170,9 @@
'project-list
(plain-file "project-list" (string-join val "\n")))))
+(define (serialize-extra-options extra-options)
+ (string-join extra-options "\n" 'suffix))
+
(define repository-directory? string?)
(define (serialize-repository-directory _ val)
@@ -641,6 +645,7 @@ for cgit to allow access to that repository.")
(define (rest? field)
(not (memq (configuration-field-name field)
'(project-list
+ extra-options
repository-directory
repositories))))
#~(string-append
@@ -649,6 +654,8 @@ for cgit to allow access to that repository.")
#$(serialize-project-list
'project-list
(cgit-configuration-project-list config))
+ #$(serialize-extra-options
+ (cgit-configuration-extra-options config))
#$(serialize-repository-directory
'repository-directory
(cgit-configuration-repository-directory config))
--
2.17.0
next prev parent reply other threads:[~2018-05-18 10:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 21:13 [bug#31277] [PATCH] cgit changes Christopher Baines
2018-04-26 21:23 ` [bug#31277] [PATCH 1/3] gnu: cgit: Fix included scripts Christopher Baines
2018-04-26 21:23 ` [bug#31277] [PATCH 2/3] services: cgit: Improve handling of extra-options Christopher Baines
2018-04-28 11:19 ` Clément Lassieur
2018-05-18 10:56 ` Christopher Baines
2018-04-26 21:23 ` [bug#31277] [PATCH 3/3] services: cgit: Make project-list permit a string Christopher Baines
2018-04-28 10:57 ` Clément Lassieur
2018-05-18 10:57 ` Christopher Baines
2018-04-28 11:30 ` [bug#31277] [PATCH 1/3] gnu: cgit: Fix included scripts Clément Lassieur
2018-05-18 10:55 ` Christopher Baines
2018-05-18 15:49 ` Clément Lassieur
2018-05-18 18:13 ` bug#31277: " Christopher Baines
2018-04-28 11:39 ` [bug#31277] [PATCH] cgit changes Clément Lassieur
2018-05-18 10:23 ` [bug#31277] [PATCH 1/3] gnu: cgit: Fix included scripts Christopher Baines
2018-05-18 10:23 ` Christopher Baines [this message]
2018-05-18 10:23 ` [bug#31277] [PATCH 3/3] services: cgit: Make project-list permit a file-object Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180518102339.26480-2-mail@cbaines.net \
--to=mail@cbaines.net \
--cc=31277@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.