compat/mingw.h: Set S_ISUID to prevent a fast-import test failure
commit90110d7645e5035ea59bc5c72fac4e11ad55a6ef
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>
Tue, 17 Apr 2012 18:00:04 +0000 (17 19:00 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Apr 2012 20:00:57 +0000 (18 13:00 -0700)
tree166ec49e460365bedf144260fc159fe1863c8492
parente8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d
compat/mingw.h: Set S_ISUID to prevent a fast-import test failure

The current t9300-fast-import.sh test number 62 ("L: nested tree
copy does not corrupt deltas") was introduced in commit 9a0edb79
("fast-import: add a test for tree delta base corruption",
15-08-2011). A fix for the demonstrated problem was introduced
by commit 8fb3ad76 ("fast-import: prevent producing bad delta",
15-08-2011). However, this fix didn't work on MinGW and so this
test has always failed on MinGW.

Part of the solution in commit 8fb3ad76 was to add an NO_DELTA
preprocessor constant which was defined as follows:

  +/*
  + * We abuse the setuid bit on directories to mean "do not delta".
  + */
  +#define NO_DELTA S_ISUID
  +

Unfortunately, the S_ISUID constant on MinGW is defined as zero.

In order to fix the problem, we simply alter the definition of
S_ISUID in the mingw header file to a more appropriate value.
Also, we take the opportunity to similarly define S_ISGID and
S_ISVTX.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.h