git-codereview: fix hook installation in git 2.13.0
git 2.13.0 changed the behavior of git rev-parse --git-path from
printing a path relative to the repo root to printing a path relative
to the working directory. This breaks git-codereview's hook
installation when a git-codereview command is invoked from a directory
other than the repo root, since it will try to resolve this path as
relative to the repo root.
Fix this by running git rev-parse from the repo root, so it behaves
the same either way.
Reviewed-by: Russ Cox <email@example.com>
2 files changed