Subject: [bug#54293] [WIP] home: Add home-git-service-type

From: 宋文武 <[email-masked]>
Date: Wed, 09 Mar 2022 20:18:32 +0800

Maxime Devos <[email-masked]> writes:

> 宋文武 schreef op ma 07-03-2022 om 22:51 [+0800]:
>> +           (for-each
>> +            (match-lambda
>> +              ((key value)
>> +               (simple-format #t "\t~a = ~s~%" key value)))
>
> What if I want to set the key 'bar' to the value 'foo bar ' (without
> teh quotes, but with the trailing space)?  If I do ‘git config
> 'foo.bar' "foo bar "’, then the following is added to .git/config:
>
> [foo]
>         bar = "foo bar "
>
> so it seems that some escaping may be necessary.

Yes, '~s' in the format string will use 'write' which will print strings
in double quotes with some escapes.  I think it's compatible with
gitconfig's requirement.

>
> Also, what character encoding does git expect .git/config expect it to
> be in?  UTF-8, whatever the current locale's encoding is, ...?

I guess it expect UTF-8, will do some tests later, thanks!