On Thu, 23 Feb 2012 11:50:29 +0000, Torsten Krah wrote: ... > In theory yes it would work to do the same thing again in post-commit - > but pre-commit already did all the work before. Would be nice if there > would be no need to parse and analyze things twice, may take time and > resources depending on the commit size.
Put the pre-commit hook work aside (which you need to do anyway), and when no post-commit hook has picked it up for, say, 15 minutes, discard it. If the server should really be that slow, then you will have to recreate the stuff, but only then. You can do the expiry check in the post-commit trigger; you may also look at the (monotonical) revision number. I don't expect there to be a guarantee that there is only ever one set of hooks (pre-hook/commit/post-hook) running, so you need to deal with multiple work sets anyway. Andreas -- "Totally trivial. Famous last words." From: Linus Torvalds <torvalds@*.org> Date: Fri, 22 Jan 2010 07:29:21 -0800
