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

Re: [gitolite] symlink hooks instead of copying them

From
MKmartin f krafft <madduck@madduck.net>
Date
Feb 4, 2010, 01:46 UTC
Message-ID
<20100204014657.GA10114@lapse.rw.madduck.net>
In-Reply-To
<20100204013556.GA2590@atcmail.atc.tcs.com>
also sprach Sitaram Chamarty <sitaram@atc.tcs.com> [2010.02.04.1428 +1300]:
> I'm ok with symlinking stuff; a couple of "cp" commands
> would change to "ln" :)  Let me try it out (and make sure it
> works for upgrades also...)
ln -sf even.
also sprach Sitaram Chamarty <sitaram@atc.tcs.com> [2010.02.04.1435 +1300]:
Show 7 quoted lines
> I forgot... part of the reason this "copy all hooks over each time
> you run install" is also to give people an easy way to update the
> hooks when the repo was *copied* from elsewhere, and not *created*
> by gitolite in the first place.
> 
> Basically I'm paranoid about that "update" hook, without which the
> branch level access control doesn't work at all.

Wouldn't it thus make sense to check during authentication that the symlink exists and points to the right file, and to deny access completely if that isn't the case?

> So this will still need to be done. Or you'll have to provide some
> other command that will sweep through all repos in the $REPO_BASE
> and check that the symlink is pointing to the right place etc etc.

Having a mass-update command for this might be nice, but I suppose it's also a trivial shell one-liner...

  for i (**/*.git/hooks/update) \
    ln -sf ~git/.gitolite/src/hooks/update $i
(this is zsh, not sure bash can do this yet)
-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
apt-get source --compile gentoo
 
spamtraps: madduck.bogus@madduck.net
Previous: Sitaram ChamartyNext: Sitaram Chamarty
Message 4 of 8 in “[gitolite] symlink hooks instead of copying them”
  1. martin f krafftFeb 3, 2010
  2. Sitaram ChamartyFeb 4, 2010
  3. Sitaram ChamartyFeb 4, 2010
  4. martin f krafftFeb 4, 2010
  5. Sitaram ChamartyFeb 4, 2010
  6. martin f krafftFeb 4, 2010
  7. Bill LearFeb 4, 2010
  8. martin f krafftFeb 4, 2010

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.