From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107517 invoked by alias); 4 Sep 2015 18:26:18 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 107501 invoked by uid 89); 4 Sep 2015 18:26:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: limerock02.mail.cornell.edu Received: from limerock02.mail.cornell.edu (HELO limerock02.mail.cornell.edu) (128.84.13.242) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Sep 2015 18:26:17 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id t84IQE4b021483 for ; Fri, 4 Sep 2015 14:26:15 -0400 Received: from [10.128.135.71] (dhcp-gs-1863.eduroam.cornell.edu [10.128.135.71]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id t84IQDuh005798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 4 Sep 2015 14:26:14 -0400 Subject: Re: Problem with git and file mode changes To: cygwin@cygwin.com References: <20150904151229.GB14466@dinwoodie.org> From: Ken Brown Message-ID: <55E9E24A.3000204@cornell.edu> Date: Fri, 04 Sep 2015 18:26:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150904151229.GB14466@dinwoodie.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00076.txt.bz2 On 9/4/2015 11:12 AM, Adam Dinwoodie wrote: > On Fri, Sep 04, 2015 at 04:44:11PM +0200, Dani Moncayo wrote: >> After doing a 'git pull', I saw that git didn't make the merge, >> because apparently I had some local changes. But I didn't make >> any local change. For example, this file appears as modified: >> >> $ git status --short test/rmailmm.el >> M test/rmailmm.el >> >> $ git diff test/rmailmm.el >> diff --git a/test/rmailmm.el b/test/rmailmm.el >> old mode 100644 >> new mode 100755 >> >> Mmm strange, I never changed the permissions of any file in my >> repo. And moreover: >> >> $ ls -o test/rmailmm.el >> -rwxrwxr--+ 1 Dani 3106 Sep 4 16:19 test/rmailmm.el >> >> According to 'ls', the file mode is 774, but according to git is >> 755. Which one is wrong? > > Git internally only stores file permissions of 755 or 644*; anything > else is mapped down to one of those two, based (I believe) on whether > the user execute bit is set or not. > >> Well, let's try to revert the misterious change: >> >> $ git checkout test/rmailmm.el >> >> $ git status --short test/rmailmm.el >> M test/rmailmm.el >> >> $ git diff test/rmailmm.el >> diff --git a/test/rmailmm.el b/test/rmailmm.el >> old mode 100644 >> new mode 100755 >> >> $ ls -o test/rmailmm.el >> -rwxrwxr--+ 1 Dani 3106 Sep 4 16:28 test/rmailmm.el >> >> Apparently nothing has changed after the 'git checkout'!! > > It looks like the underlying file system is failing to record the file > permissions correctly**. That could be a limitation of the file system > (FAT32 is much more limited than NTFS, for example, and I could believe > permissions go very wrong over network shares), of the options with > which the filesystem is mounted in Cygwin (take a look for "noacl" in > the Cygwin FAQs), or possibly just that you don't have permission to > change the file properties (although I'd expect an error in that > scenario). Another option is that some non-Cygwin program is getting in > the way and interfering with the permissions. This could also be a result of default ACL entries on the directory 'test'. Dani, you might want to try 'setfacl -b test' and/or 'setfacl -k test'. ('setfacl -h' will give you more information.) Ken -- 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