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
On 2024-10-22 21:31, ~puercopop wrote:
> 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, \
Thank you for the patch, applied, updated commit message, pushed.
There are a few notes for whoever read this thread in the future and
would like to help:
We need to:
- migrate git service to rde/home/services/
- implement serializer in a similiar way it done for rde home services.
- write tests for serializer.
https://todo.sr.ht/~abcdw/tickets/21
--
Best regards,
Andrew Tropin