git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista

From
MRMarco Roeland <marco.roeland@xs4all.nl>
Date
Aug 16, 2007, 09:56 UTC
Message-ID
<20070816095655.GA13069@fiberbit.xs4all.nl>
In-Reply-To
<46C40CB3.5415D888@eudaptics.com>
On Thursday August 16th 2007 at 10:37 Johannes Sixt wrote:
> I don't see how this could make a difference: __USE_MINGW_ACCESS appears
> in none of the mingw header files nor in the mingw.git sources.
> 
> Is my build environment outdated?

The mingw patch for fixing this Vista regression (from Danny Smith on March 5th) is in mingw-runtime-3.12-1. It is in file <include/io.h> and works like this:

#ifdef __USE_MINGW_ACCESS
/*  Old versions of MSVCRT access() just ignored X_OK, while the version
    shipped with Vista, returns an error code.  This will restore the
    old behaviour  */
static inline int __mingw_access (const char* __fname, int __mode)
  { return  _access (__fname, __mode & ~X_OK); }
#define access(__f,__m)  __mingw_access (__f, __m)
#endif

Whenever the X_OK bit is set in the mode flag for access(2) Vista returns an error for the call. So yes, using __USE_MINGW_ACCESS will not work on older mingw versions. Defining X_OK to 0 for mingw might fix the problem for older versions.

-- 
Marco Roeland
Previous: Johannes Sixt
Message 4 of 4 in “Fixed error 'fatal: Not a git repository' on Vista”
  1. Fixed error 'fatal: Not a git repository' on VistaDmitry Kakurin, Aug 2, 2007
  2. Johannes SchindelinAug 2, 2007
  3. Johannes SixtAug 16, 2007
  4. Marco RoelandAug 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.