1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-15 13:43:45 +01:00
git/compat
Torsten Bögershausen 0117c2f043 Make core.sharedRepository work under cygwin 1.7
When core.sharedRepository is used, set_shared_perm() in path.c
needs lstat() to return the correct POSIX permissions.

The default for cygwin is core.ignoreCygwinFSTricks = false, which
means that the fast implementation in do_stat() is used instead of
lstat().

lstat() under cygwin uses the Windows security model to implement
POSIX-like permissions.  The user, group or everyone bits can be set
individually.

do_stat() simplifes the file permission bits, and may return a wrong
value.  The read-only attribute of a file is used to calculate the
permissions, resulting in either rw-r--r-- or r--r--r--

One effect of the simplified do_stat() is that t1301 fails.

Add a function cygwin_get_st_mode_bits() which returns the POSIX
permissions.  When not compiling for cygwin, true_mode_bits() in
path.c is used.

Side note:

t1301 passes under cygwin 1.5.

The "user write" bit is synchronized with the "read only" attribute
of a file:

    $ chmod 444 x
    $ attrib x
    A    R     C:\temp\pt\x

    cygwin 1.7 would show
    A          C:\temp\pt\x

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-25 14:57:33 -07:00
..
fnmatch Merge branch 'nd/wildmatch' 2013-01-10 13:47:20 -08:00
nedmalloc nedmalloc: Fix a compile warning (exposed as error) with GCC 4.7.2 2012-12-11 22:10:22 -08:00
poll make poll() work on platforms that can't recv() on a non-socket 2012-09-17 15:44:20 -07:00
regex
vcbuild msvc: Fix build by adding missing symbol defines 2013-02-25 12:40:03 -08:00
win32 make poll available for other platforms lacking it 2012-09-17 15:42:57 -07:00
basename.c
bswap.h
cygwin.c Make core.sharedRepository work under cygwin 1.7 2013-03-25 14:57:33 -07:00
cygwin.h Make core.sharedRepository work under cygwin 1.7 2013-03-25 14:57:33 -07:00
fopen.c
hstrerror.c
inet_ntop.c
inet_pton.c
memmem.c
mingw.c Merge branch 'ef/mingw-rmdir' 2012-12-11 15:51:14 -08:00
mingw.h mingw: get rid of getpass implementation 2012-12-04 08:03:42 -08:00
mkdir.c compat: some mkdir() do not like a slash at the end 2012-08-24 09:48:51 -07:00
mkdtemp.c
mmap.c
msvc.c
msvc.h msvc: test-svn-fe: Fix linker "unresolved external" error 2013-02-25 12:40:34 -08:00
obstack.c
obstack.h
pread.c
precompose_utf8.c precompose-utf8: do not call checks for non-ascii "utf8" 2012-08-20 11:12:58 -07:00
precompose_utf8.h git on Mac OS and precomposed unicode 2012-07-08 22:03:46 -07:00
qsort.c
setenv.c
snprintf.c
strcasestr.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c mingw: reuse tty-version of git_terminal_prompt 2012-12-04 08:03:08 -08:00
terminal.h
unsetenv.c
win32.h
win32mmap.c
winansi.c