Re: [PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Apr 9, 2019, 05:53 UTC
- Message-ID
- <0f629384-638f-bfb9-89da-ade335e364fd@web.de>
- In-Reply-To
- <6c7d4155-e554-dc9a-053e-f3a8c7cd4075@cs-ware.de>
On 2019-04-08 13:16, Sven Strickroth wrote:
Show 6 quoted lines
> 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 > 25d90d1cb72ce51407324259516843406142fe89.
Was it ? 25d90d1cb merged this commit: 1cadad6f6 (junio/tb/use-common-win32-pathfuncs-on-cygwin)
And, if I read that correctly, 1cadad6f6 does not change anything for MSVC. And the problem with the missing/wrong path resolution was there before 1cadad6f6 and after 1cadad6f6.
From that point of view, the patch looks correct, but:
The other question:
In config.mak.uname we need to add a line compat/win32/path-utils.o for the Windows build. In the git-for windows codebase I see COMPAT_OBJS +=compat/win32/path-utils
3 times: For Cygwin, MINGW and Windows.
In git.git only for Cygwin and MINGW.
(I don't have MSVC, so I can't test)
Show 19 quoted lines
> > Signed-off-by: Sven Strickroth <email@cs-ware.de> > --- > git-compat-util.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/git-compat-util.h b/git-compat-util.h > index e0275da7e0..9be177e588 100644 > --- a/git-compat-util.h > +++ b/git-compat-util.h > @@ -210,6 +210,7 @@ > #include "compat/mingw.h" > #include "compat/win32/fscache.h" > #elif defined(_MSC_VER) > +#include "compat/win32/path-utils.h" > #include "compat/msvc.h" > #include "compat/win32/fscache.h" > #else >