Hi,
Apologies once again for the delay :(
On Tue, Feb 08, 2022 at 02:34:51PM -0800, y wrote:
> I tried using POST_CREATE initially but it ran too early in the process.
> The config files were not updated with remotes yet. That happens late in
> POST_COMPILE for me. I am now marking the new repo with a file in a
> 'mirror-mark' script during POST_CREATE. Then process the fetch in a
> separate POST_COMPILE 'mirror-fetch' script after searching all repos with
> marker files. (I know I can improve this a bit...)
Although I have not "officially" documented it, there *is* a
supported way in which to add your own POST_CREATE trigger and
make it run *after* the built-in trigger scripts.
If you don't mind, take a look at
https://groups.google.com/g/gitolite/c/2kZaqLohSz0/m/LsIo_W8B2I8J
I think the reason I did not document it is that it's very
rarely needed (you're only the second person to have come across
such a situation in all these years, and the last one was in
2013!)
But it *is* supported, so now I think I will document it as soon
as I find some time.
Meanwhile *please let me know if that works for you!*
> I solved my immediate issue but noticed some unexpected behavior. Initially
> I used a single script and had it in both POST_CREATE and POST_COMPILE
> triggers. After your reply I noticed that the script only runs in
> POST_COMPILE and ignores POST_CREATE. The repo does get created on disk
> successfully. Is this working as intended?
yes. That was an optimisation that went in at some point (see
https://github.com/sitaramc/gitolite/commit/cf423a6a74b398eaa1dd67966ab2e02ff422274a)
If the solution in the earlier part of this email does not work
for you, and you *need* your trigger script ('input') to run for
both, you'll just have to `ln input input2` and use `input2` in
one of them to defeat the optimisation.
(side note, "input" is not a good name, because gitolite itself
has "INPUT" triggers so there is the possibility of confusion!)
hope this helps!
sitaram