Subject: bug#79024: 31.0.50; Multiple working trees support for VC

From: Sean Whitton <[email-masked]>
Date: Sat, 16 Aug 2025 12:56:42 +0100

Hello,

On Thu 14 Aug 2025 at 06:30pm +03, Eli Zaretskii wrote:

>> From: Sean Whitton <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Thu, 14 Aug 2025 15:03:37 +0100
>>
>> Do you know of any reason we couldn't refactor things in vc-git.el like
>> this?  It would reduce complexity a fair bit.
>
> The problem here is that coding-system-for-write is used for two
> purposes: (1) to encode the command-line arguments of a program we are
> about to run, and (2) to encode any text we send to the program.  And
> on Windows we must use two different encodings: command-line arguments
> must be encoded with the system codepage, whereas Git prefers its
> input and output to be encoded in UTF-8.
>
> Binding coding-system-for-write to locale-coding-system in
> vc-git-command basically overrides any encoding forced by the callers,
> including by users (if the type "C-x RET c SOMETHING RET" when
> invoking VC commands).
>
> So unfortunately, I think this complexity is needed.

Thanks.  We *are* overriding the user, as described, in vc-git-checkin
and vc-git-modify-change-comment, but we have to do so there.  But we
should limit how much we do that.  I'll add to the comments.

-- 
Sean Whitton