summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorAdam Roben <adam@roben.org>2019-08-24 22:38:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-26 17:06:03 (GMT)
commit4e1a641ee345bbc877ed82962e12c45f09b6617b (patch)
tree51d518ed0d44e3ce0e80558113fcad9cb56ec2ab /gitweb
parent745f6812895b31c02b29bdfe4ae8e5498f776c26 (diff)
downloadgit-4e1a641ee345bbc877ed82962e12c45f09b6617b.zip
git-4e1a641ee345bbc877ed82962e12c45f09b6617b.tar.gz
git-4e1a641ee345bbc877ed82962e12c45f09b6617b.tar.bz2
mingw: fix launching of externals from Unicode paths
If Git were installed in a path containing non-ASCII characters, commands such as `git am` and `git submodule`, which are implemented as externals, would fail to launch with the following error: > fatal: 'am' appears to be a git command, but we were not > able to execute it. Maybe git-am is broken? This was due to lookup_prog not being Unicode-aware. It was somehow missed in 85faec9d3a (Win32: Unicode file name support (except dirent), 2012-03-15). Note that the only problem in this function was calling `GetFileAttributes()` instead of `GetFileAttributesW()`. The calls to `access()` were fine because `access()` is a macro which resolves to `mingw_access()`, which already handles Unicode correctly. But `lookup_prog()` was changed to use `_waccess()` directly so that we only convert the path to UTF-16 once. To make things work correctly, we have to maintain UTF-8 and UTF-16 versions in tandem in `lookup_prog()`. Signed-off-by: Adam Roben <adam@roben.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb')
0 files changed, 0 insertions, 0 deletions