From: Junio C Hamano Date: Mon, 15 Jun 2015 21:45:55 GMT Subject: Re: [PATCH] [RFC] Make git-update-ref invoke the update and post-update hooks Message-ID: In-Reply-To: Brian Vandenberg writes: > Would you be less doubtful about adding a lower-level hook for > update-ref? Or in lieu of that, a config option that can affect the > behavior of its "-m" and "-d" options? Not really. Those who want to bypass your policy can use "vi .git/packed-refs" and/or "rm .git/refs/heads/foo"; you would not propose to patch "rm" and "vi" to pay attention to git configuration, because they are not about "git" at all, and there are cases where these bare-metal level editing of repositories is necessary. You would instead tell them "don't do that". When I say "update-ref is a low-level plumbing command that should not enforce policy", I am suggesting you to treat the command just like you would treat "rm" and "vi".