[Dnsmasq-discuss] [patch] empty empty lines
paul at mad-scientist.net
Mon Sep 30 17:01:52 BST 2019
On Mon, 2019-09-30 at 15:50 +0100, Simon Kelley wrote:
> If we're going to do this, the first stage is probably to add hooks
> to git to run expand (for tabs) and this filter on all NEW commits.
> Then we won't ever have to do that again.
I don't think you can really do this sort of thing with Git.
Git uses a SHA computed from the content of the commit to identify the
commit, so if you make changes to the content on the remote when it is
pushed through some sort of hook, then the commit on the remote will
have a different SHA than the local commit. Now the remote master (for
example) has diverged from your local master, just as if someone had
done a force-push to rewrite history (which did happen, sort of) and
it's a real pain.
What you can do is have a hook which will check the content of the
incoming pushed commits and reject the push if any of them have
incorrect formats. Then it will be up to the person pushing to fix
their local copy and re-run the push with correct content.
Just FYI... :)
More information about the Dnsmasq-discuss