go /
review /
14b1fbe320ebb5298986e1301b5bd632b78014f9 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.
Fixes golang/go#19477.
Change-Id: Ia5e1b81da5041365d817daf9f5979df0772ede4b
Reviewed-on: https://go-review.googlesource.com/38010
Reviewed-by: Russ Cox <rsc@golang.org>
2 files changed