delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/12/27/18:18:23

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3398F3858C39
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1640647102;
bh=cLBN21Poyd61GNtunHq7hfs4XjNk7fqxfLvNut3lglw=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=cdeOoZRU7+32moK1V2MiQwQuENlAReSz7TbZ+JCHqq/v9BCAqA91A1ay1MvR0p/fh
gYEKkprWfNMh2P8wqzqJe6nl2sTEFZVfq7PtoIFaXSe+V5h818tbdDSIzVRHdIJ8Uz
4ni+7cFwEmDnfllW5lLJQ6KVt1+0yubM15J9kRZ0=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 899A53858C39
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.jhmg.net 04BEA40103
Message-ID: <bdc057c4-e8b4-f60d-54c6-ab8f6b9c0e4f@jhmg.net>
Date: Mon, 27 Dec 2021 15:17:13 -0800
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 Thunderbird/91.4.1
Subject: Re: git and filemodes
To: Adam Dinwoodie <adam AT dinwoodie DOT org>, cygwin AT cygwin DOT com
References: <2eef10a5-ad9b-a663-6fe4-896e3805b8ba AT jhmg DOT net>
<CA+kUOamusZbWfriVWY2++EDN_E_bJR=o+WCTP3WK4CjMxjWOZg AT mail DOT gmail DOT com>
In-Reply-To: <CA+kUOamusZbWfriVWY2++EDN_E_bJR=o+WCTP3WK4CjMxjWOZg@mail.gmail.com>
X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_PASS,
SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Jim Garrison via Cygwin <cygwin AT cygwin DOT com>
Reply-To: jhg AT acm DOT org
Cc: Jim Garrison <jhg AT jhmg DOT net>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 12/27/2021 3:13 PM, Adam Dinwoodie wrote:
[snip]
> This is normal Git behaviour: it doesn't record detailed file
> permissions, only presence or absence of an executable bit. It only
> ever shows  file permissions as 644 (meaning "not executable") or 755
> (meaning "executable").
> 
> Specifically, the committed version of your .gitignore file is not
> executable, but the version in your current working copy is
> executable. This is a common side-effect of checking the repository
> out using Cygwin's Git, then accessing the repository with native
> Windows programs, which includes Git for Windows. Cygwin emulates the
> *nix approach of not setting the executable bit unless it's necessary,
> whereas native Windows programs almost always set the executable bit
> on any file they touch in common with normal Windows application
> practice.
> 
> If this behaviour is undesirable for you, I'd recommend either
> sticking to using Cygwin editors, or running `git config core.fileMode
> false` to instruct Git to ignore the executable bit on the filesystem.

Thanks for the detailed explanation, that makes perfect sense.

-- 
Jim Garrison
jhg AT acm DOT org

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019