|
From: | Eric Blake |
Subject: | Re: [Qemu-block] [Qemu-devel] [PATCH 03/10] qemu-iotests: make 218 executable |
Date: | Fri, 5 Oct 2018 13:19:53 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 10/5/18 1:02 PM, Eric Blake wrote:
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.
Also, many maintainers already have scripts/checkpatch.pl as a git pre-commit hook, and putting the check in checkpatch.pl means that patchew would also flag the issue.
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |