X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.5 required=5.0	tests=AWL,BAYES_00,TW_RW
X-Spam-Check-By: sourceware.org
Message-ID: <4EFCD4A5.70206@bopp.net>
Date: Thu, 29 Dec 2011 14:59:17 -0600
From: Jeremy Bopp <jeremy@bopp.net>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Distributed Git not compiled under Cygwin?
References: <33047124.post@talk.nabble.com> <4EFB8FC1.7060307@bopp.net> <4EFB9714.2070103@bopp.net> <33049604.post@talk.nabble.com> <4EFC834D.5090805@bopp.net> <33052021.post@talk.nabble.com>
In-Reply-To: <33052021.post@talk.nabble.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 12/29/2011 02:28 PM, cxira wrote:
> 
> 
> Jeremy Bopp-3 wrote:
>> I never had a problem with the native gVim cooperating with Cygwin's Git
>> (more accurately file permissions) either.  Can you provide more detail
>> about your situation?  How exactly are the permissions broken, and for
>> which application(s) are they broken?
> 
> Here's what I see:
> $ gvim temp
> :wq
> $ ls -al temp
> -rwx------+ 1 Doug None 0 Dec 29 15:21 temp
> 
> Expected:
> $ touch temp2
> $ ls -al temp2
> -rw-r--r--+ 1 Doug None 0 Dec 29 15:22 temp2
> 
> It isn't a problem that causes a conflict with anything, but if I commit
> these files to the repository with their file modes as 0700, other people
> that use the repository may have problems with them (not to mention the show
> in as green executables in ls). I actually pushed these files to an Apache
> webserver for production one time and the entire site was not working for a
> bit because of that.

The execute bit is the only permission that Git actually records:

http://book.git-scm.com/1_the_git_object_model.html

Unfortunately, it's the only one that's giving you grief here.  You
might try setting the noacl mount option for the Cygwin mount containing
your repository:

http://cygwin.com/cygwin-ug-net/using.html#mount-table

Another option may be to hack a post-save action into gVim that uses
Cygwin's chmod command to remove the execute bit from newly saved files:

http://stackoverflow.com/questions/4627701/vim-how-to-execute-automatically-execute-a-shell-command-after-saving-a-file

If all else fails, you could also install the Windows-native build of
Git and use that instead.  Cygwin's gVim may also make sense to use here
instead of the native one, but I remember you saying that the native
gVim integrates better for what you do.

-Jeremy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

