Hi, Jakub Kądziołka <k...@kadziolka.net> writes:
> On Sun Jan 31, 2021 at 6:18 AM CET, Leo Famulari wrote: >> On Sat, Jan 30, 2021 at 06:37:11PM -0500, Mark H Weaver wrote: >> > What would the Git hook do, precisely? The reason I ask is that some >> > bug fixes are appropriate on a frozen branch. How would a Git hook >> > determine whether a given commit should be allowed? >> >> I haven't given much thought to how it would work but, if it ran on the >> client side as a pre-push hook, it could be easily disabled by the >> committer, when necessary. Ah, I see now that 'git push' has the "--no-verify" option, which causes it to skip the pre-push hook. Sure, that sounds workable. > Alternatively, one could include some control sequence in the commit > message. For example, > > Allow-Frozen: staging It's an interesting idea, but it occurs to me that such annotations would have no long-term relevance, and so I'd prefer not to pollute our commit log history with them. A year from now, it's unlikely to be relevant whether a bug fix pushed today happened to be committed to the 'staging' branch when it was frozen. For our purposes, we only need a transient way to disable the pre-push hook, whereas anything included in the commit log is permanent and forever immutable. Therefore, my preference would be to use the "--no-verify" option. I could live with either approach, though. What do you think? Regards, Mark