Subject: Re: [bug#31089] [PATCH 3/5] services: cgit: Add support for file-like objects.

From: Clément Lassieur <[email-masked]>
Date: Mon, 09 Apr 2018 09:19:37 +0200

Clément Lassieur <[email-masked]> writes:

> * doc/guix.texi (Version Control Services): Update accordingly.
> * gnu/services/cgit.scm (serialize-field, serialize-string, serialize-boolean,
> serialize-integer, serialize-repository-cgit-configuration-list,
> serialize-nginx-server-configuration-list, serialize-repo-field,
> serialize-repo-boolean, serialize-repo-integer, serialize-module-link-path,
> serialize-repository-directory, serialize-mimetype-alist): Return strings or
> string-valued gexps and stop printing.
> (repository-cgit-configuration)[source-filter, about-filter, commit-filter,
> logo, owner-filter], (cgit-configuration)[auth-filter, commit-filter, css,
> email-filter, favicon, include, logo, owner-filter, mimetype-file, readme,
> source-filter]: Replace STRING with FILE-OBJECT.
> (file-object?, serialize-file-object, repo-file-object?,
> serialize-repo-file-object): New procedures.
> (cgit-activation): Use SERIALIZE-CONFIGURATION's return value with
> MIXED-TEXT-FILE instead of using its output with PLAIN-FILE.
> ---
>  doc/guix.texi         | 37 +++++++++---------
>  gnu/services/cgit.scm | 87 ++++++++++++++++++++++++-------------------
>  2 files changed, 67 insertions(+), 57 deletions(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 738fdf65c..35d23e1be 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -18552,7 +18552,7 @@ NGINX configuration.

I'll also add:

The @code{file-object} type designates either a file-like object
(@pxref{G-Expressions, file-like objects}) or a string.

>  @end deftypevr
>  
> -@deftypevr {@code{cgit-configuration} parameter} string about-filter
> +@deftypevr {@code{cgit-configuration} parameter} file-object about-filter
>  Specifies a command which will be invoked to format the content of about
>  pages (both top-level and for each repository).