Re: [gitolite] symlink hooks instead of copying them
- From
- Sitaram Chamarty <sitaram@atc.tcs.com>
- Date
- Feb 4, 2010, 01:28 UTC
- Message-ID
- <20100204012840.GC497@atcmail.atc.tcs.com>
- In-Reply-To
- <20100203204723.GA30157@lapse.rw.madduck.net>
On Thu, Feb 04, 2010 at 09:47:23AM +1300, martin f krafft wrote:
Show 11 quoted lines
> Dear Sitaram, dear Teemo, dear gitolite-fans, > > Gitolite currently copies hooks to repositories. For upgrades, it > must thus ensure that all hooks are also upgraded. > > It occurs to me that this might be easier done using symlinks, or > with a file that includes the master hook(s) in > ~/.gitolite/src/hooks. Then, the hooks just have to be upgraded in > one place. > > Do you see a reason not to do this via symlinks?
If you mean just the gitolite-specific hooks (the update hook for all repos, and the post-update hook for the admin repo) then no problem.
The other hooks I'd rather not assume anything about. The current scheme forces an overwrite of the gitolite-specific hooks, as well as any hooks given in src/hooks, each time an "install" is done. It does not touch any *other* hooks, which allows the admin to (via command line) place specific hooks in specific repos manually if he wishes to.
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...)