{"thread":{"id":"9348","subject":"[MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista","startedAt":"2007-08-02T05:47:07Z","lastAt":"2007-08-16T09:56:55Z","messageCount":4,"participants":["Dmitry Kakurin","Johannes Schindelin","Johannes Sixt","Marco Roeland"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"49389","messageId":"DE6EEF3D318C4051827B95DF26D97BE7@ntdev.corp.microsoft.com","threadId":"9348","inReplyTo":null,"subject":"[MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista","fromName":"Dmitry Kakurin","fromEmail":"dmitry.kakurin@gmail.com","sentAt":"2007-08-02T05:47:07Z","receivedAt":"2007-08-02T05:47:07Z","isPatch":true,"sender":{"key":"dmitry.kakurin@gmail.com","avatar":null},"body":"Any git command was immediately failing on Vista under MinGW with\nfatal: Not a git repository\n\n>From 51d66fbfe3a7876d9a7b699bb47c0ab186ddc7a2 Mon Sep 17 00:00:00 2001\nFrom: Dmitry Kakurin <Dmitry.Kakurin@gmail.com>\nDate: Wed, 1 Aug 2007 22:30:43 -0700\nSubject: [PATCH] Fixed error 'fatal: Not a git repository' on Vista\nDefined __USE_MINGW_ACCESS that changes access( ..., X_OK ) into F_OK\n\nSigned-off-by: Dmitry Kakurin <Dmitry.Kakurin@gmail.com>\n---\n Makefile |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 8e9a76b..ef40267 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -500,7 +500,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n  NO_SYMLINKS=YesPlease\n  NO_SVN_TESTS=YesPlease\n  NO_PERL_MAKEMAKER=YesPlease\n- COMPAT_CFLAGS \n+= -DNO_ETC_PASSWD -DNO_ST_BLOCKS -DSTRIP_EXTENSION=\\\".exe\\\" -I compat\n+ COMPAT_CFLAGS \n+= -DNO_ETC_PASSWD -DNO_ST_BLOCKS -DSTRIP_EXTENSION=\\\".exe\\\" -D__USE_MINGW_ACCESS \n -I compat\n  COMPAT_OBJS += compat/mingw.o compat/fnmatch.o compat/regex.o\n  EXTLIBS += -lws2_32\n  X = .exe\n-- \n1.5.2.2\n"},{"id":"49409","messageId":"Pine.LNX.4.64.0708021107470.14781@racer.site","threadId":"9348","inReplyTo":"DE6EEF3D318C4051827B95DF26D97BE7@ntdev.corp.microsoft.com","subject":"Re: [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-08-02T10:33:53Z","receivedAt":"2007-08-02T10:33:53Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n[please consider reading Documentation/SubmittingPatches; you did not Cc: \nthe maintainer, Johannes Sixt]\n\nOn Wed, 1 Aug 2007, Dmitry Kakurin wrote:\n\n> Any git command was immediately failing on Vista under MinGW with\n> fatal: Not a git repository\n\nThanks for submitting this patch.  I cannot test personally, because \nnobody I know has Vista.\n\nI guess that Hannes will apply your patch when he comes back from his \nwell-deserved holiday.\n\nYou might want to consider pushing your changes to the mob branch on \nrepo.or.cz/git/mingw.git.\n\n>From your mail, I take it that the .zip file I sent you is working \nproperly?\n\nCiao,\nDscho\n"},{"id":"50864","messageId":"46C40CB3.5415D888@eudaptics.com","threadId":"9348","inReplyTo":"DE6EEF3D318C4051827B95DF26D97BE7@ntdev.corp.microsoft.com","subject":"Re: [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista","fromName":"Johannes Sixt","fromEmail":"j.sixt@eudaptics.com","sentAt":"2007-08-16T08:37:07Z","receivedAt":"2007-08-16T08:37:07Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Dmitry Kakurin wrote:\n> - COMPAT_CFLAGS\n> += -DNO_ETC_PASSWD -DNO_ST_BLOCKS -DSTRIP_EXTENSION=\\\".exe\\\" -I compat\n> + COMPAT_CFLAGS\n> += -DNO_ETC_PASSWD -DNO_ST_BLOCKS -DSTRIP_EXTENSION=\\\".exe\\\" -D__USE_MINGW_ACCESS\n\nI don't see how this could make a difference: __USE_MINGW_ACCESS appears\nin none of the mingw header files nor in the mingw.git sources.\n\nIs my build environment outdated?\n\n-- Hannes\n"},{"id":"50871","messageId":"20070816095655.GA13069@fiberbit.xs4all.nl","threadId":"9348","inReplyTo":"46C40CB3.5415D888@eudaptics.com","subject":"Re: [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista","fromName":"Marco Roeland","fromEmail":"marco.roeland@xs4all.nl","sentAt":"2007-08-16T09:56:55Z","receivedAt":"2007-08-16T09:56:55Z","isPatch":true,"sender":{"key":"marco.roeland@xs4all.nl","avatar":null},"body":"On Thursday August 16th 2007 at 10:37 Johannes Sixt wrote:\n\n> I don't see how this could make a difference: __USE_MINGW_ACCESS appears\n> in none of the mingw header files nor in the mingw.git sources.\n> \n> Is my build environment outdated?\n\nThe mingw patch for fixing this Vista regression (from Danny Smith on\nMarch 5th) is in mingw-runtime-3.12-1. It is in file <include/io.h> and\nworks like this:\n\n#ifdef __USE_MINGW_ACCESS\n/*  Old versions of MSVCRT access() just ignored X_OK, while the version\n    shipped with Vista, returns an error code.  This will restore the\n    old behaviour  */\nstatic inline int __mingw_access (const char* __fname, int __mode)\n  { return  _access (__fname, __mode & ~X_OK); }\n#define access(__f,__m)  __mingw_access (__f, __m)\n#endif\n\nWhenever the X_OK bit is set in the mode flag for access(2) Vista\nreturns an error for the call. So yes, using __USE_MINGW_ACCESS will not\nwork on older mingw versions. Defining X_OK to 0 for mingw might fix the\nproblem for older versions.\n-- \nMarco Roeland\n"}]}