On 12/4/18 3:24 AM, Edward Diener via Boost wrote:
We have again run into the situation where files with a Linux executable permission have been committed to various Boost git repositories, with Jim King creating a PR and list of these files in Boost Admin. I have fixed these for the repositories for which I have write access, and created PRs for the other repositories. But this begs the question as to what Boost's stance should be about adding actual executable files to a Boost git repository ? As an example a Linux bash command file was added to a particular repository and I created a PR to remove the executable file permission from the file. But the maintainer of the repository feels this is wrong and the Linux bash file should retain the executable file permissions and that the file should be part of the repository. But of course I am more interested here about the general principal of the matter. Obviously operating system command/batch files are executable files, but should they be so in a repository.
Yes, script files that are supposed to be run should have the executable bit set in git as well. The problem is when this bit is set for files that are not supposed to be executable (e.g. C++ source files or docs). These instances need to be fixed and, preferably, prevented from appearing in the future.
Finally should be not have some sort of git hook that somehow eliminates this recurring problem of files with executable permissions being periodically committed to a Boost git repository ? Most all of the files I "fixed" or created PRs for are clearly source files what can not be "executed" in any way. But this happening again is a real problem to have to clean up each time.
Yes, I'm in favor of adding some sort of a server-side git hook. For that all script files need to have an appropriate extension so that they can be whitelisted to have an executable permission. Though I'm not sure how server-side git hooks work with GitHub. A separate concern of mine is binary executables. IMHO, those should be outright banned, executable or not. Not that I remember seeing ones in git, but while we're at it, we could enforce it as well.