From: Alex Riesen Date: Tue, 17 Mar 2009 20:28:18 GMT Subject: Re: [PATCH] disable post-checkout test on Cygwin Message-ID: <20090317202818.GA13458@blimp.localdomain> In-Reply-To: <49BFD6DD.1010800@viscovery.net> Johannes Sixt, Tue, Mar 17, 2009 17:59:09 +0100: > Junio C Hamano schrieb: > > Alex Riesen writes: > > > >> It is broken because of the tricks we have to play with > >> lstat to get the bearable perfomance out of the call. > >> Sadly, it disables access to Cygwin's executable attribute, > >> which Windows filesystems do not have at all. > > > > Hmm, perhaps when checking hooks to see if they are executable, Cygwin > > port should avoid using the "tricks"? Compared to paths inside the > > worktree the number of hooks is a lot smaller, no? > > Hmm. Nowadays, we run hooks through run_hook() in run_command.c. It uses The problem is that copy_templates_1 does an lstat on the files in templates directory and gets 0666 mode (regular file, non-exec) for executable file under current Cygwin port. The st_mode of that lstat is passed to copy_file mentioned, which is useless now as we use the Win32 version of lstat, which doesn't do x-bit. > access(..., X_OK), not lstat(). We don't play games with access(), do we? > access(..., X_OK) will return -1.