git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Aaron Schrab
Message 6 of 6 in “Adding hooks.directory config option; wiring into run_hook”
  1. Adding hooks.directory config option; wiring into run_hookChristopher Dale, Dec 16, 2011
  2. Junio C HamanoDec 16, 2011
  3. Christopher DaleDec 16, 2011
  4. Junio C HamanoDec 16, 2011
  5. Aaron SchrabDec 17, 2011
  6. Aaron SchrabDec 17, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.