{"thread":{"id":"50893","subject":"[PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)","startedAt":"2019-04-08T11:26:40Z","lastAt":"2019-04-12T01:15:46Z","messageCount":10,"participants":["Sven Strickroth","Taylor Blau","Torsten Bögershausen","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"373415","messageId":"6c7d4155-e554-dc9a-053e-f3a8c7cd4075@cs-ware.de","threadId":"50893","inReplyTo":null,"subject":"[PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)","fromName":"Sven Strickroth","fromEmail":"email@cs-ware.de","sentAt":"2019-04-08T11:16:33Z","receivedAt":"2019-04-08T11:26:40Z","isPatch":true,"sender":{"key":"email@cs-ware.de","avatar":"https://avatars.githubusercontent.com/u/428133?v=4"},"body":"A path such as 'c:/somepath/submodule/../.git/modules/submodule' wasn't\nresolved correctly any more, because the *nix variant of\noffset_1st_component is used instead of the Win32 specific version.\n\nRegression was introduced in commit\n25d90d1cb72ce51407324259516843406142fe89.\n\nSigned-off-by: Sven Strickroth <email@cs-ware.de>\n---\n git-compat-util.h | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex e0275da7e0..9be177e588 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -210,6 +210,7 @@\n #include \"compat/mingw.h\"\n #include \"compat/win32/fscache.h\"\n #elif defined(_MSC_VER)\n+#include \"compat/win32/path-utils.h\"\n #include \"compat/msvc.h\"\n #include \"compat/win32/fscache.h\"\n #else\n-- \n2.21.0.windows.1\n\n"},{"id":"373452","messageId":"20190409023630.GG81620@Taylors-MBP.hsd1.wa.comcast.net","threadId":"50893","inReplyTo":"6c7d4155-e554-dc9a-053e-f3a8c7cd4075@cs-ware.de","subject":"Re: [PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2019-04-09T02:36:30Z","receivedAt":"2019-04-09T02:36:35Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Hi Sven,\n\nOn Mon, Apr 08, 2019 at 01:16:33PM +0200, Sven Strickroth wrote:\n> A path such as 'c:/somepath/submodule/../.git/modules/submodule' wasn't\n> resolved correctly any more, because the *nix variant of\n> offset_1st_component is used instead of the Win32 specific version.\n\nI'm not a win32 expert by any sense, but I am do have a meta-question\nabout your patch...\n\n> Regression was introduced in commit\n> 25d90d1cb72ce51407324259516843406142fe89.\n\nI can't seem to find this commit anywhere upstream. Is this SHA-1 pasted\ncorrectly?\n\n>\n> Signed-off-by: Sven Strickroth <email@cs-ware.de>\n> ---\n>  git-compat-util.h | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index e0275da7e0..9be177e588 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -210,6 +210,7 @@\n>  #include \"compat/mingw.h\"\n>  #include \"compat/win32/fscache.h\"\n>  #elif defined(_MSC_VER)\n> +#include \"compat/win32/path-utils.h\"\n>  #include \"compat/msvc.h\"\n>  #include \"compat/win32/fscache.h\"\n>  #else\n> --\n> 2.21.0.windows.1\n\nThanks,\nTaylor\n"},{"id":"373455","messageId":"0f629384-638f-bfb9-89da-ade335e364fd@web.de","threadId":"50893","inReplyTo":"6c7d4155-e554-dc9a-053e-f3a8c7cd4075@cs-ware.de","subject":"Re: [PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-04-09T05:53:09Z","receivedAt":"2019-04-09T05:53:35Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2019-04-08 13:16, Sven Strickroth wrote:\n> A path such as 'c:/somepath/submodule/../.git/modules/submodule' wasn't\n> resolved correctly any more, because the *nix variant of\n> offset_1st_component is used instead of the Win32 specific version.\n>\n> Regression was introduced in commit\n> 25d90d1cb72ce51407324259516843406142fe89.\n\nWas it ?\n25d90d1cb merged this commit:\n1cadad6f6 (junio/tb/use-common-win32-pathfuncs-on-cygwin)\n\nAnd, if I read that correctly,  1cadad6f6 does not change anything for MSVC.\nAnd the problem with the missing/wrong path resolution was there before\n1cadad6f6 and after 1cadad6f6.\n\nFrom that point of view, the patch looks correct, but:\n\nThe other question:\n\nIn config.mak.uname  we need to add a line\ncompat/win32/path-utils.o\nfor the Windows build.\nIn the git-for windows codebase I see\n  COMPAT_OBJS +=compat/win32/path-utils\n\n3 times:\nFor Cygwin, MINGW and Windows.\n\nIn git.git only for Cygwin and MINGW.\n\n(I don't have MSVC, so I can't test)\n\n>\n> Signed-off-by: Sven Strickroth <email@cs-ware.de>\n> ---\n>  git-compat-util.h | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index e0275da7e0..9be177e588 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -210,6 +210,7 @@\n>  #include \"compat/mingw.h\"\n>  #include \"compat/win32/fscache.h\"\n>  #elif defined(_MSC_VER)\n> +#include \"compat/win32/path-utils.h\"\n>  #include \"compat/msvc.h\"\n>  #include \"compat/win32/fscache.h\"\n>  #else\n>\n\n"},{"id":"373462","messageId":"950ee9b8-786f-28cd-3e89-ad174fd857a4@cs-ware.de","threadId":"50893","inReplyTo":"0f629384-638f-bfb9-89da-ade335e364fd@web.de","subject":"Re: [PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)","fromName":"Sven Strickroth","fromEmail":"sven@cs-ware.de","sentAt":"2019-04-09T07:34:08Z","receivedAt":"2019-04-09T07:42:24Z","isPatch":true,"sender":{"key":"sven@cs-ware.de","avatar":null},"body":"Am 09.04.2019 um 07:53 schrieb Torsten Bögershausen:\n>> Regression was introduced in commit\n>> 25d90d1cb72ce51407324259516843406142fe89.\n> \n> Was it ?\n> 25d90d1cb merged this commit:\n> 1cadad6f6 (junio/tb/use-common-win32-pathfuncs-on-cygwin)\n\nYes, I copied the revision of the merge commit.\n\n> And, if I read that correctly,  1cadad6f6 does not change anything for MSVC.\n> And the problem with the missing/wrong path resolution was there before\n> 1cadad6f6 and after 1cadad6f6.\n\nThat's not correct, it was correct before:\n1cadad6f6 removes mingw_offset_1st_component from mingw.c which is\nincluded by msvc.c. Then the in git-compat.h the new file\n\"compat/win32/path-utils.h\" is only included for __CYGWIN__ and\n__MINGW32__, here _MSC_VER is missing -> that's the regression.\n\n> In config.mak.uname  we need to add a line\n> compat/win32/path-utils.o\n> for the Windows build.\n> In the git-for windows codebase I see\n>   COMPAT_OBJS +=compat/win32/path-utils\n\nI don't use config.mak.uname and never did, so I can't tell you about that.\n\n-- \nBest regards,\n Sven Strickroth\n PGP key id F5A9D4C4 @ any key-server\n"},{"id":"373481","messageId":"31485f76-13a9-ec3b-16b9-78864490164d@cs-ware.de","threadId":"50893","inReplyTo":"950ee9b8-786f-28cd-3e89-ad174fd857a4@cs-ware.de","subject":"[PATCH v2] MSVC: Unbreak real_path for Windows paths","fromName":"Sven Strickroth","fromEmail":"email@cs-ware.de","sentAt":"2019-04-08T11:26:16Z","receivedAt":"2019-04-09T11:27:26Z","isPatch":true,"sender":{"key":"email@cs-ware.de","avatar":"https://avatars.githubusercontent.com/u/428133?v=4"},"body":"A path such as 'c:/somepath/submodule/../.git/modules/submodule' wasn't\nresolved correctly any more, because the *nix variant of offset_1st_component\nis used instead of the Win32 specific version.\n\nRegression was introduced in commit 1cadad6f6 when mingw_offset_1st_component\nwas moved from mingw.c which is included by msvc.c to a separate file. Then,\nthe new file \"compat/win32/path-utils.h\" was only included for the __CYGWIN__\nand __MINGW32__ cases in git-compat-util.h, the case for _MSC_VER was missing.\n\nSigned-off-by: Sven Strickroth <email@cs-ware.de>\n---\n config.mak.uname  | 1 +\n git-compat-util.h | 1 +\n 2 files changed, 2 insertions(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 32381f5fd1..eb1428858c 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -426,6 +426,7 @@ ifeq ($(uname_S),Windows)\n \tCFLAGS =\n \tBASIC_CFLAGS = -nologo -I. -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE\n \tCOMPAT_OBJS = compat/msvc.o compat/winansi.o \\\n+\t\tcompat/win32/path-utils.o \\\n \t\tcompat/win32/pthread.o compat/win32/syslog.o \\\n \t\tcompat/win32/dirent.o compat/win32/fscache.o\n \tCOMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DDETECT_MSYS_TTY -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\\\".exe\\\"\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex e0275da7e0..9be177e588 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -210,6 +210,7 @@\n #include \"compat/mingw.h\"\n #include \"compat/win32/fscache.h\"\n #elif defined(_MSC_VER)\n+#include \"compat/win32/path-utils.h\"\n #include \"compat/msvc.h\"\n #include \"compat/win32/fscache.h\"\n #else\n-- \n2.21.0.windows.1\n"},{"id":"373484","messageId":"xmqqzhoz4d2f.fsf@gitster-ct.c.googlers.com","threadId":"50893","inReplyTo":"31485f76-13a9-ec3b-16b9-78864490164d@cs-ware.de","subject":"Re: [PATCH v2] MSVC: Unbreak real_path for Windows paths","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-09T11:45:28Z","receivedAt":"2019-04-09T11:45:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sven Strickroth <email@cs-ware.de> writes:\n\n> A path such as 'c:/somepath/submodule/../.git/modules/submodule' wasn't\n> resolved correctly any more, because the *nix variant of offset_1st_component\n> is used instead of the Win32 specific version.\n>\n> Regression was introduced in commit 1cadad6f6 when mingw_offset_1st_component\n> was moved from mingw.c which is included by msvc.c to a separate file. Then,\n> the new file \"compat/win32/path-utils.h\" was only included for the __CYGWIN__\n> and __MINGW32__ cases in git-compat-util.h, the case for _MSC_VER was missing.\n>\n> Signed-off-by: Sven Strickroth <email@cs-ware.de>\n> ---\n>  config.mak.uname  | 1 +\n>  git-compat-util.h | 1 +\n>  2 files changed, 2 insertions(+)\n\nSome context lines in config.mak.uname did not match tips of any of\nthe well-known branches I tried, and the blob object name recorded\non the \"index\" line was not useful, either, so I ended up applying\nthe patch by hand.  I do not think I screwed up a simple two-liner\npatch like this too badly ;-), but please keep an eye on what will\nappear on 'pu' and holler if I did, so we can correct it before it\nhits 'master'.\n\nThanks.\n\n>\n> diff --git a/config.mak.uname b/config.mak.uname\n> index 32381f5fd1..eb1428858c 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -426,6 +426,7 @@ ifeq ($(uname_S),Windows)\n>  \tCFLAGS =\n>  \tBASIC_CFLAGS = -nologo -I. -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE\n\n"},{"id":"373519","messageId":"af640e82-ca1a-9c96-da47-62aaea1cc18e@web.de","threadId":"50893","inReplyTo":"950ee9b8-786f-28cd-3e89-ad174fd857a4@cs-ware.de","subject":"Re: [PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-04-09T16:19:38Z","receivedAt":"2019-04-09T16:19:54Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2019-04-09 09:34, Sven Strickroth wrote:\n> Am 09.04.2019 um 07:53 schrieb Torsten Bögershausen:\n>>> Regression was introduced in commit\n>>> 25d90d1cb72ce51407324259516843406142fe89.\n>>\n>> Was it ?\n>> 25d90d1cb merged this commit:\n>> 1cadad6f6 (junio/tb/use-common-win32-pathfuncs-on-cygwin)\n>\n> Yes, I copied the revision of the merge commit.\n>\n>> And, if I read that correctly,  1cadad6f6 does not change anything for MSVC.\n>> And the problem with the missing/wrong path resolution was there before\n>> 1cadad6f6 and after 1cadad6f6.\n>\n> That's not correct, it was correct before:\n\nNo, I wasn't aware that msvc.c include mingw.c - for whatever reason.\n\n\n> 1cadad6f6 removes mingw_offset_1st_component from mingw.c which is\n> included by msvc.c. Then the in git-compat.h the new file\n> \"compat/win32/path-utils.h\" is only included for __CYGWIN__ and\n> __MINGW32__, here _MSC_VER is missing -> that's the regression.\n>\n\nOK, good.\nIf possible, I would like to see this kind of information\nin the commit message.\nThanks for cleaning up my mess.\n\n\n\n"},{"id":"373522","messageId":"xmqqv9zn2kjs.fsf@gitster-ct.c.googlers.com","threadId":"50893","inReplyTo":"af640e82-ca1a-9c96-da47-62aaea1cc18e@web.de","subject":"Re: [PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-09T16:46:47Z","receivedAt":"2019-04-09T16:46:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n>> 1cadad6f6 removes mingw_offset_1st_component from mingw.c which is\n>> included by msvc.c. Then the in git-compat.h the new file\n>> \"compat/win32/path-utils.h\" is only included for __CYGWIN__ and\n>> __MINGW32__, here _MSC_VER is missing -> that's the regression.\n>>\n>\n> OK, good.\n> If possible, I would like to see this kind of information\n> in the commit message.\n> Thanks for cleaning up my mess.\n\nThanks, both.  Should I wait for an update that fixes the proposed\nlog message?\n"},{"id":"373571","messageId":"d1cf10ec-ca57-09e3-cf00-3be87dec06ee@web.de","threadId":"50893","inReplyTo":"xmqqv9zn2kjs.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2019-04-10T05:32:35Z","receivedAt":"2019-04-10T05:32:57Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2019-04-09 18:46, Junio C Hamano wrote:\n> Torsten Bögershausen <tboegi@web.de> writes:\n>\n>>> 1cadad6f6 removes mingw_offset_1st_component from mingw.c which is\n>>> included by msvc.c. Then the in git-compat.h the new file\n>>> \"compat/win32/path-utils.h\" is only included for __CYGWIN__ and\n>>> __MINGW32__, here _MSC_VER is missing -> that's the regression.\n>>>\n>>\n>> OK, good.\n>> If possible, I would like to see this kind of information\n>> in the commit message.\n>> Thanks for cleaning up my mess.\n>\n> Thanks, both.  Should I wait for an update that fixes the proposed\n> log message?\n>\n\nIt seems that I haven't read all messages in my mailbox (or messages crossed).\n\nThe V2 patch describes the problem well and looks OK for me.\n\n"},{"id":"373698","messageId":"xmqqftqo10si.fsf@gitster-ct.c.googlers.com","threadId":"50893","inReplyTo":"d1cf10ec-ca57-09e3-cf00-3be87dec06ee@web.de","subject":"Re: [PATCH] Unbreak real_path on Windows for already absolute paths (with Visual Studio)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-12T01:15:41Z","receivedAt":"2019-04-12T01:15:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> It seems that I haven't read all messages in my mailbox (or messages crossed).\n>\n> The V2 patch describes the problem well and looks OK for me.\n\nYeah, I just re-read the log message with a fresh pair of eyes, and\nI think it is clear enough.\n\nThanks, both.\n"}]}