From 52cceaf2663422a79a0f1d21f905eb132e46b556 Mon Sep 17 00:00:00 2001 From: Florent Valette Date: Tue, 15 Oct 2024 18:04:44 +0200 Subject: [PATCH] git,cmd: add encoding arg to popen if universal newlines is True --- git/cmd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/git/cmd.py b/git/cmd.py index 90fc39cd6..2048a43fa 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -1269,6 +1269,7 @@ def execute( stdout=stdout_sink, shell=shell, universal_newlines=universal_newlines, + encoding=defenc if universal_newlines else None, **subprocess_kwargs, ) except cmd_not_found_exception as err: