Skip to content

Commit 22c3634

Browse files
cswaregitster
authored andcommitted
MSVC: include compat/win32/path-utils.h for MSVC, too, for real_path()
A path such as 'c:/somepath/submodule/../.git/modules/submodule' wasn't resolved correctly any more, because the *nix variant of offset_1st_component is used instead of the Win32 specific version. Regression was introduced in commit 1cadad6 when mingw_offset_1st_component was moved from mingw.c which is included by msvc.c to a separate file. Then, the new file "compat/win32/path-utils.h" was only included for the __CYGWIN__ and __MINGW32__ cases in git-compat-util.h, the case for _MSC_VER was missing. Signed-off-by: Sven Strickroth <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1cadad6 commit 22c3634

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

config.mak.uname

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ ifeq ($(uname_S),Windows)
392392
CFLAGS =
393393
BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
394394
COMPAT_OBJS = compat/msvc.o compat/winansi.o \
395+
compat/win32/path-utils.o \
395396
compat/win32/pthread.o compat/win32/syslog.o \
396397
compat/win32/dirent.o
397398
COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"

git-compat-util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@
197197
#include "compat/win32/path-utils.h"
198198
#include "compat/mingw.h"
199199
#elif defined(_MSC_VER)
200+
#include "compat/win32/path-utils.h"
200201
#include "compat/msvc.h"
201202
#else
202203
#include <sys/utsname.h>

0 commit comments

Comments
 (0)