git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista
@ 2007-08-02  5:47 Dmitry Kakurin
  2007-08-02 10:33 ` Johannes Schindelin
  2007-08-16  8:37 ` Johannes Sixt
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Kakurin @ 2007-08-02  5:47 UTC (permalink / raw)
  To: git

Any git command was immediately failing on Vista under MinGW with
fatal: Not a git repository

>From 51d66fbfe3a7876d9a7b699bb47c0ab186ddc7a2 Mon Sep 17 00:00:00 2001
From: Dmitry Kakurin <Dmitry.Kakurin@gmail.com>
Date: Wed, 1 Aug 2007 22:30:43 -0700
Subject: [PATCH] Fixed error 'fatal: Not a git repository' on Vista
Defined __USE_MINGW_ACCESS that changes access( ..., X_OK ) into F_OK

Signed-off-by: Dmitry Kakurin <Dmitry.Kakurin@gmail.com>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 8e9a76b..ef40267 100644
--- a/Makefile
+++ b/Makefile
@@ -500,7 +500,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
  NO_SYMLINKS=YesPlease
  NO_SVN_TESTS=YesPlease
  NO_PERL_MAKEMAKER=YesPlease
- COMPAT_CFLAGS 
+= -DNO_ETC_PASSWD -DNO_ST_BLOCKS -DSTRIP_EXTENSION=\".exe\" -I compat
+ COMPAT_CFLAGS 
+= -DNO_ETC_PASSWD -DNO_ST_BLOCKS -DSTRIP_EXTENSION=\".exe\" -D__USE_MINGW_ACCESS 
 -I compat
  COMPAT_OBJS += compat/mingw.o compat/fnmatch.o compat/regex.o
  EXTLIBS += -lws2_32
  X = .exe
-- 
1.5.2.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista
  2007-08-02  5:47 [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista Dmitry Kakurin
@ 2007-08-02 10:33 ` Johannes Schindelin
  2007-08-16  8:37 ` Johannes Sixt
  1 sibling, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2007-08-02 10:33 UTC (permalink / raw)
  To: Dmitry Kakurin; +Cc: git, Johannes Sixt

Hi,

[please consider reading Documentation/SubmittingPatches; you did not Cc: 
the maintainer, Johannes Sixt]

On Wed, 1 Aug 2007, Dmitry Kakurin wrote:

> Any git command was immediately failing on Vista under MinGW with
> fatal: Not a git repository

Thanks for submitting this patch.  I cannot test personally, because 
nobody I know has Vista.

I guess that Hannes will apply your patch when he comes back from his 
well-deserved holiday.

You might want to consider pushing your changes to the mob branch on 
repo.or.cz/git/mingw.git.

>From your mail, I take it that the .zip file I sent you is working 
properly?

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista
  2007-08-02  5:47 [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista Dmitry Kakurin
  2007-08-02 10:33 ` Johannes Schindelin
@ 2007-08-16  8:37 ` Johannes Sixt
  2007-08-16  9:56   ` Marco Roeland
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Sixt @ 2007-08-16  8:37 UTC (permalink / raw)
  To: git

Dmitry Kakurin wrote:
> - COMPAT_CFLAGS
> += -DNO_ETC_PASSWD -DNO_ST_BLOCKS -DSTRIP_EXTENSION=\".exe\" -I compat
> + COMPAT_CFLAGS
> += -DNO_ETC_PASSWD -DNO_ST_BLOCKS -DSTRIP_EXTENSION=\".exe\" -D__USE_MINGW_ACCESS

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?

-- Hannes

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista
  2007-08-16  8:37 ` Johannes Sixt
@ 2007-08-16  9:56   ` Marco Roeland
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Roeland @ 2007-08-16  9:56 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-16 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-02  5:47 [MinGW PATCH] Fixed error 'fatal: Not a git repository' on Vista Dmitry Kakurin
2007-08-02 10:33 ` Johannes Schindelin
2007-08-16  8:37 ` Johannes Sixt
2007-08-16  9:56   ` Marco Roeland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).