git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git fast-export not preserving executable permissions?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 4, 2020, 14:23 UTC
Message-ID
<nycvar.QRO.7.76.6.2005041620540.56@tvgsbejvaqbjf.bet>
In-Reply-To
<20200501223240.GG41612@syl.local>
Hi,
On Fri, 1 May 2020, Taylor Blau wrote:
> If you are using NTFS or FAT32, neither of these filesystems support
> execute permission bits. (I am certainly not an expert here, but I know
> that Dscho (cc'd) would be able to answer authoritatively here.)

On Windows, there are indeed no executable bits. A file is considered executable if it has a file extension indicating it, e.g. `.exe`.

In Git for Windows' Bash (which comes from MSYS2), `ls -l` will also consider files whose first line is a hash-bang one (e.g. `#!/bin/sh`) as executable. This information is however _not_ used by Git.

If you want to mark a file as executable in Git for Windows, you will have to use `git add --chmod=+x <file>`.

Ciao, Johannes

Previous: Taylor BlauNext: Torsten Bögershausen
Message 5 of 6 in “git fast-export not preserving executable permissions?”
  1. Doug GliddenApr 29, 2020
  2. Taylor BlauApr 29, 2020
  3. Doug GliddenMay 1, 2020
  4. Taylor BlauMay 1, 2020
  5. Johannes SchindelinMay 4, 2020
  6. Torsten BögershausenApr 30, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.