From 791531ddd22185248e70e53e4d6d46fca3bb112a Mon Sep 17 00:00:00 2001 From: Elsa Ferrara Date: Thu, 26 Sep 2024 15:50:50 +0200 Subject: [PATCH] Support utf8 in git log This MR will enable utf8 support for git log command. Having utf8 characters in commit message causes windows cb to crash when checking out the repository (due to the call to git log : https://gaia.adacore.com/event/s3attachment/87497674/adacore-gaia-logs-eu-west-1__slash__gnatwin-cont-6660986__slash__checkout.libadalang.log). ref: IT-2058 --- src/e3/anod/checkout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/e3/anod/checkout.py b/src/e3/anod/checkout.py index 6b872f08..f41be3dc 100644 --- a/src/e3/anod/checkout.py +++ b/src/e3/anod/checkout.py @@ -297,7 +297,7 @@ def update_git( g.write_log(fd, rev_range=f"{old_commit}..{new_commit}") tmp_filename = fd.name try: - with open(tmp_filename) as fd: + with open(tmp_filename, encoding="utf8") as fd: commits = list(g.parse_log(fd, max_diff_size=1024)) finally: rm(tmp_filename)