Suggestion: Allow .gitattributes to specify executable mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

some build systems have script files with certain specific names which are always intended to be executable.
For example Gradle has a `gradlew` file, and Maven has a (currently unofficial) `mvnw` file.

For Windows users these script files often cause problems when checked in with Git and used by a CI (continuous
integration) system running Linux. The CI build usually fails because the script files do not have the executable
flag set (Windows does not have this concept).

Would it be possible to extend the `.gitattributes` file to allow specifying that files should automatically get
the executable flag when added to the index? For example Gradle's `gradle init` command already creates a
`.gitattributes` file; it could then add such a default entry to ease development for Windows users to make sure
they add the `gradlew` script file with the correct file mode.

Assuming the flag is called `exec`, Gradle could then create the following `.gitattributes` entry:
```
gradlew    text exec
```

It might also help with questions such as https://stackoverflow.com/q/14267441.

What do you think?

My C knowledge is rather limited, and I am not familiar with the Git source, so unfortunately I cannot submit a
patch for this.

Kind regards






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux