Re: Odd Difference Between Windows Git and Standard Git
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 20, 2016, 15:23 UTC
- Message-ID
- <xmqqy474g3cv.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <ede1c113-1ab8-6043-3e39-bbacec5db31c@web.de>
Torsten Bögershausen <tboegi@web.de> writes:
Show 12 quoted lines
>>> What does >>> git diff >>> say ? >> >> Great question. For all the unexpected files it says the >> same thing: >> >> old mode 100755 >> new mode 100644 > > So the solution is to run > git config core.filemode false
Thanks for asking a great question. I somehow expected that we probe in init-db.c::create_default_files() for this when we probe for case sensitivity, symlinks, etc., but apparently we don't.
I guess we don't because on some filesystems we can't. IIRC, it goes something like: chmod immediately followed by lstat pretends that change to the executable bit stuck, until the in-core buffer at the vfs layer is flushed to the disk platter that holds the filesystem without any notion of executable bit.