What did you do before the bug happened? Install latest git 2.55.0 on Win11 25H2 Pro Czech, try starting Git Gui via Start Menu. User logged in via Entra ID (AzureAD) which creates automatically home directory in C:\Users\ containing non-ascii diacritical marks (here `ý` - accented `y` in Czech language)
What did you expect to happen? Git GUI opens fine
What happened instead? Dialog box with error and tofu characters instead of real unicode characters: The defined shell ('C:/Users/PetraKA1/2ovA¡/AppData/Local/Programs/Git/usr/bin/sh.exe') is not usable, it must be an absolute path to an executable.)
git-gui fails to start with "The defined shell ('...') is not usable, it must be an absolute path to an executable." when the user's home directory path contains non-ASCII characters (e.g., accented letters from an EntraID profile).
Steps to Reproduce: 1. Have a Windows user profile with non-ASCII characters in the username 2. Install Git for Windows (per-user or system-wide under a path containing non-ASCII chars) 3. Run `git gui` 4. Observe the error dialog
Root Cause as found by OpenCode using Big Pickle AI model: In `git-gui.tcl` line 403, `safe_exec [list cygpath -m $_shellpath]` captures cygpath's output using Tcl's default system encoding (ANSI code page), but cygpath outputs in UTF-8. When the path contains non-ASCII characters, the encoding mismatch produces a corrupted path that fails validation. Suggested Fix according to Big Pickle, I approved the agent to perform the fix and it worked, then Git GUI could be run fine: Replace the `safe_exec` call with a pipe opened through `safe_open_command` and explicitly set `-encoding utf-8` on the channel, matching the pattern used in `git_redir` and `_parse_config`.
```tcl
if {[is_Windows]} {
set cmdp [make_arglist_safe [list cygpath -m $_shellpath]]
set fd [open [concat [list | ] $cmdp] r]
fconfigure $fd -encoding utf-8
set _shellpath [string trimright [read $fd] "\n\r"]
close $fd
}[System Info] git version: git version 2.55.0.windows.1 cpu: x86_64 built from commit: bf5afdecc10478397d7059d07573630902fb2e2f sizeof-long: 4 sizeof-size_t: 8 shell-path: D:/git-sdk-64-build-installers/usr/bin/sh rust: disabled feature: fsmonitor--daemon gettext: enabled libcurl: 8.21.0 OpenSSL: OpenSSL 3.5.7 9 Jun 2026 zlib: 1.3.2 SHA-1: SHA1_DC SHA-256: SHA256_BLK default-ref-format: files default-hash: sha1 uname: Windows 10.0 26200 compiler info: gnuc: 16.1 libc info: no libc information available $SHELL (typically, interactive shell): <unset>
[Enabled Hooks] not run from a git repository - no hooks to show
Regards
-- Martin Malec https://github.com/brozkeff/