Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/review: hooks does not re-install hooks #16777
My GOROOT had the default Gerrit hooks instead of git-codereview's hooks.
installHook probably needs a flag to skip this block of code:
Or, we could use file size as a heuristic to re-install the hooks, since we're already statting the file.
We shouldn't overwrite existing hooks. That much seems clear.
I'd rather not add more flags and I'd rather not have the tool delete anything; this is rarely used functionality, I suspect, which means the opportunity for latent bugs and data loss is higher.
Perhaps when there are existing hooks, we could print a message like: