GNU bug report logs - #77186
[PATCH 00/13] Revamp the gitolite-service-type

Previous Next

Package: guix-patches;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Sat, 22 Mar 2025 16:49:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tomas Volf <~@wolfsden.cz>
To: 77186 <at> debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [bug#77186] [PATCH v2 01/14] services: gitolite-rc-file-compiler: Switch to match-record.
Date: Tue,  1 Apr 2025 00:10:07 +0200
* gnu/services/version-control.scm (gitolite-rc-file-compiler): Use
match-record instead of match with $.

Change-Id: Ia2f4985e921aee5f8859d1858f7c186b707d7a36
---
 gnu/services/version-control.scm | 55 ++++++++++++++++----------------
 1 file changed, 28 insertions(+), 27 deletions(-)

diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index 06b6ff224d..f5558e9197 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2018 Christopher Baines <mail <at> cbaines.net>
 ;;; Copyright © 2021 Julien Lepiller <julien <at> lepiller.eu>
+;;; Copyright © 2025 Tomas Volf <~@wolfsden.cz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -267,33 +268,33 @@ (define-record-type* <gitolite-rc-file>
 
 (define-gexp-compiler (gitolite-rc-file-compiler
                        (file <gitolite-rc-file>) system target)
-  (match file
-    (($ <gitolite-rc-file> umask local-code unsafe-pattern git-config-keys roles enable)
-     (apply text-file* "gitolite.rc"
-      `("%RC = (\n"
-        "    UMASK => " ,(format #f "~4,'0o" umask) ",\n"
-        "    GIT_CONFIG_KEYS => '" ,git-config-keys "',\n"
-        ,(if local-code
-             (simple-format #f "    LOCAL_CODE => \"~A\",\n" local-code)
-             "")
-        "    ROLES => {\n"
-        ,@(map (match-lambda
-                 ((role . value)
-                  (simple-format #f "        ~A => ~A,\n" role value)))
-               roles)
-        "    },\n"
-        "\n"
-        "    ENABLE => [\n"
-        ,@(map (lambda (value)
-                 (simple-format #f "        '~A',\n" value))
-               enable)
-        "    ],\n"
-        ");\n"
-        "\n"
-        ,(if unsafe-pattern
-             (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");")
-             "")
-        "1;\n")))))
+  (match-record file <gitolite-rc-file>
+                (umask local-code unsafe-pattern git-config-keys roles enable)
+    (apply text-file* "gitolite.rc"
+           `("%RC = (\n"
+             "    UMASK => " ,(format #f "~4,'0o" umask) ",\n"
+             "    GIT_CONFIG_KEYS => '" ,git-config-keys "',\n"
+             ,(if local-code
+                  (simple-format #f "    LOCAL_CODE => \"~A\",\n" local-code)
+                  "")
+             "    ROLES => {\n"
+             ,@(map (match-lambda
+                      ((role . value)
+                       (simple-format #f "        ~A => ~A,\n" role value)))
+                    roles)
+             "    },\n"
+             "\n"
+             "    ENABLE => [\n"
+             ,@(map (lambda (value)
+                      (simple-format #f "        '~A',\n" value))
+                    enable)
+             "    ],\n"
+             ");\n"
+             "\n"
+             ,(if unsafe-pattern
+                  (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");")
+                  "")
+             "1;\n"))))
 
 (define-record-type* <gitolite-configuration>
   gitolite-configuration make-gitolite-configuration
-- 
2.49.0





This bug report was last modified 50 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.