On 10/5/18 12:49 PM, Cleber Rosa wrote:
We could add a git pre-commit hook grep'ing for "^#!\
*(/usr/bin/env|/bin/(b?a)?sh)" in the 1st line and then checking the
file perms.
Good idea. Probably better to send that as a different patch, right?
Yes, separate patch. For that matter, "^#!/" is probably a sufficient
pattern to catch any file that intends to be run via an interpreter, and
therefore wants to be executable, rather than limiting to just env and
specific shells.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org