gitolite/src/commands
Sitaram Chamarty 198dcfd4c8 POST_CREATE efficiency... (please read below if you care)
The POST_CREATE trigger is called when

  * a user creates a new "wild" repo,
  * a user uses the "perms" command, and
  * a user uses the "fork" command.

The trigger calls 3 programs (see rc file):

    post-compile/update-git-configs
    post-compile/update-gitweb-access-list
    post-compile/update-git-daemon-access-list

(They are also called by the POST_COMPILE trigger, by the way.)

However, the 3 programs shown are a bit wasteful -- they run through
*all* the repos when really only *one* repo has been affected.

This patch

  * passes the repo name to the 3 programs (duh!)

  * adds the optimisation to the first of the 3 programs listed above
    (the one dealing with 'git config').

For the other two programs (gitweb and git-daemon), you have 3 choices:

  * if you don't have too many repos, ignore the problem.

  * take out the 2nd and 3rd lines from the POST_CREATE list in the rc
    file, so they don't run.

    Then run 'gitolite trigger POST_COMPILE' from cron at regular
    intervals.  (Note that is POST_COMPILE not POST_CREATE!)  However,
    this means that gitweb and daemon permissions won't be current
    immediately after someone adds a new repo or sets perms etc.; they
    get updated only on the next cron run.

  * patch the programs to add this optimisation (and send me the
    patches).  The optimisation would check if arg-1 ($1 in shell,
    $ARGV[0] in perl) is 'POST_CREATE', and if it is, take the *next*
    argument as a repo name that may have changed.
2012-04-22 22:44:39 +05:30
..
access fork command, and some core changes to make it work... 2012-04-22 16:56:21 +05:30
creator supporting DOS and fake Unix... 2012-04-06 21:13:56 +05:30
D D... 2012-04-11 07:06:45 +05:30
desc external programs can get settings from rc; see below 2012-03-24 10:30:46 +05:30
fork POST_CREATE efficiency... (please read below if you care) 2012-04-22 22:44:39 +05:30
git-config 'gitolite git-config' should print only value when regex not used... 2012-04-08 11:31:04 +05:30
help supporting DOS and fake Unix... 2012-04-06 21:13:56 +05:30
info (minor) add a bit more detail on usage text for 'info' 2012-04-22 22:43:45 +05:30
mirror (perltidy) 2012-04-18 06:26:53 +05:30
perms POST_CREATE efficiency... (please read below if you care) 2012-04-22 22:44:39 +05:30
print-default-rc supporting DOS and fake Unix... 2012-04-06 21:13:56 +05:30
push added 'gitolite push' to make server side pushes easier... 2012-04-03 16:40:06 +05:30
sshkeys-lint added sshkeys-lint as a command 2012-04-03 17:15:13 +05:30
sskm (minor) do not run gitolite query-rc from *perl* programs! 2012-04-13 15:35:13 +05:30
svnserve (minor) add svnserve command 2012-04-18 06:23:21 +05:30
writable logging die and warn messages 2012-04-18 06:23:21 +05:30