git-codereview: use --path option of git config to expand ~

This change largely reverts CL 115576, and applies a simpler version.
It uses the --path option of git config to achieve equivalent behavior.

The --path option is available as far back as git 1.7.0, according to
https://git-scm.com/docs/git-config/1.7.0, making it safe to rely on:

	The type specifier can be [...] --path, which does some path expansion
	(see --path below). If no type specifier is passed, no checks or
	transformations are performed on the value.

	--path
	  git-config will expand leading ~ to the value of $HOME, and ~user
	  to the home directory for the specified user.

Change-Id: I74bb543ab488d24fe4cf66da0c6dbc087dc368a6
Reviewed-on: https://go-review.googlesource.com/116016
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
1 file changed
tree: 4edea89bc67ecab466c73841d76ca2a5d5f1b04c
  1. git-codereview/
  2. .gitattributes
  3. AUTHORS
  4. codereview.cfg
  5. CONTRIBUTING.md
  6. CONTRIBUTORS
  7. LICENSE
  8. PATENTS
  9. README.md
README.md

git-codereview

The git-codereview tool is a command-line tool for working with Gerrit.

Download/Install

The easiest way to install is to run go get -u golang.org/x/review. You can also manually git clone the repository to $GOPATH/src/golang.org/x/review.

The review binary itself is available at golang.org/x/review/git-codereview. Run git codereview hooks to install Gerrit hooks for your git repository.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the review repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/review:” in the subject line, so it is easy to find.