~abcdw/rde-devel

rde: home-git-configuration: Always use quoted strings when serializing v1 APPLIED

~puercopop: 1
 home-git-configuration: Always use quoted strings when serializing

 1 files changed, 1 insertions(+), 1 deletions(-)
#1355258 .build.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~abcdw/rde-devel/patches/55599/mbox | git am -3
Learn more about email & git

[PATCH rde] home-git-configuration: Always use quoted strings when serializing Export this patch

From: Javier Olaechea <pirata@gmail.com>

According to the Syntax section of man git-config the quoting is optional, but
if we want to include characters like `#` or `;` as part of the configuration
value we need to quote the string.

Example of the configuration that results in an invalid git config before
applying this patch:

  (use-modules (gnu home)
               (gnu services)
               ((gnu home-services version-control)
                #:select (home-git-configuration
                          home-git-service-type)))

  (home-environment
   (services
    (list (service home-git-service-type
                   (home-git-configuration
                    (config '((core ((comment-char . ";"))))))))))

assuming the configuration above lives in foo.scm we can test it using guix
home container home-foo.scm
---
 src/gnu/home-services/version-control.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gnu/home-services/version-control.scm b/src/gnu/home-services/version-control.scm
index 6bfc81f9..981941f6 100644
--- a/src/gnu/home-services/version-control.scm
+++ b/src/gnu/home-services/version-control.scm
@@ -75,7 +75,7 @@
    (#f "false")
    ((? symbol? e) (symbol->string e))
    ((? number? e) (number->string e))
    ((? string? e) e)
    ((? string? e) (format #f "~s" e))
    ((lst ...)
     (raise (formatted-message
             (G_ "Git term should be a non-list value (string, \
-- 
2.45.2
rde/patches/.build.yml: SUCCESS in 3m9s

[home-git-configuration: Always use quoted strings when serializing][0] from [~puercopop][1]

[0]: https://lists.sr.ht/~abcdw/rde-devel/patches/55599
[1]: mailto:pirata@gmail.com

✓ #1355258 SUCCESS rde/patches/.build.yml https://builds.sr.ht/~abcdw/job/1355258