From: Johannes Sixt Date: Sun, 25 Jan 2026 09:46:23 +0000 (+0100) Subject: git-gui: mark *.po files at any directory level as UTF-8 X-Git-Tag: v2.53.0-rc2~2^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a729ccb930f3c3e206117aeb4f536c9864e09c9;p=thirdparty%2Fgit.git git-gui: mark *.po files at any directory level as UTF-8 When a commit is viewed in Gitk that changes a file in po/glossary, the patch text shows mojibake instead of correctly decoded UTF-8 text. Gitk retrieves the encoding attribute to decide how to treat the bytes that make up the patch text. There is an attribute definition that all files are US-ASCII, and a later attribute definition overrides this. But the override, which specifies UTF-8, applies only to *.po files in directory po/ and does not apply to subdirectories. Widen the pattern to apply to all directory levels. Signed-off-by: Johannes Sixt --- diff --git a/.gitattributes b/.gitattributes index 889d58257f..f03c0fe3c9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,7 @@ * whitespace=indent-with-non-tab,trailing-space,space-before-tab,tabwidth=4 * encoding=US-ASCII git-gui.sh encoding=UTF-8 -/po/*.po encoding=UTF-8 +*.po encoding=UTF-8 /GIT-VERSION-GEN eol=lf Makefile whitespace=!indent,trail,space meson.build whitespace=space