Re: Adding hooks.directory config option; wiring into run_hook
- From
Aaron Schrab <aaron@schrab.com>
- Date
- Dec 17, 2011, 01:58 UTC
- Message-ID
- <20111217015820.GC30928@pug.qqx.org>
- In-Reply-To
- <CADQnX_e76LzuRUDOKFOsRHU=e8Cw+qh5x1BdW5HMEdMmP5PaHg@mail.gmail.com>
At 12:00 -0600 16 Dec 2011, Christopher Dale <chrelad@gmail.com> wrote:
>Since the hooks directory is within a directory that by it's very >nature requires write permissions,
Are you sure about this? I'd think that this would mainly be used for bare repositories. For a test I created a bare repository, removed write permission, changed the owner to root, then pushed into it from another repository. So it seems that, at least for basic usage, a bare repository can be modified even if with write permission removed since no entries are being created or removed at the top level.
For this to be a workaround, new repositories would need to be created by an admin. The requirement that the containing directory not be writeable wouldn't necessarily be an issue; at least on Linux I'm able to create files/directories as root even in a non-writeable directory.