git-codereview: clean up detached HEAD mode

Long ago I decided to return origin/HEAD from b.OriginBranch
in detached HEAD mode, thinking it would cause obvious failures.
But the joke was on me - origin/HEAD is a real thing in git,
and HEAD tracking origin/HEAD is not the right answer on dev branches.

Now that each branch's codereview.cfg typically has the branch info
we need, we can use that in detached HEAD mode to be able to provide
useful displays in commands like "git pending". And we can be careful
not to do that when we don't know the actual branch.

This commit cleans all that up.

Change-Id: I0e59bcb6f9b61e0cdce7a27299b7f29fef8e7048
6 files changed
tree: 5a15f56c8e482c8a781ffc2155b5c72a1111d72b
  1. .gitattributes
  2. AUTHORS
  3. CONTRIBUTING.md
  4. CONTRIBUTORS
  5. LICENSE
  6. PATENTS
  7. README.md
  8. codereview.cfg
  9. git-codereview/
  10. go.mod
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/git-codereview. You can also manually git clone the repository to $GOPATH/src/golang.org/x/review.

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.