On Mon, Oct 07, 2024 at 12:54:36PM +0200, Gabriel Nützi wrote: > Hi Patrick, > > Thanks for clarifications! > Could it work if for (2) -> call the reference-transaction hook after the HEAD has been initialized, meaning that Git would internally cache the > different reference transactions and then call the hooks in one go at once after the creation of the repo, such that it is initialized properly? > This might be probably a more elaborate change which introduces too many technicalities? That would break basic assumptions of how the hook operates. It is expected that we abort the transaction when the hook returns an error, so if we were to run the hook _after_ `HEAD` has been created that expectation would be broken. So the only viable solution is to create a stub `HEAD`, but as said I'm not a 100% sure whether we want to go there or not. Patrick