diff options
| author | Russ Cox <rsc@golang.org> | 2015-01-08 11:16:55 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-01-14 04:13:59 +0000 |
| commit | 75c7dd3283afd1180780ec7571df4f5edcd08ddf (patch) | |
| tree | a6070a25cc3b3541c08520bb855813565e0b789b /git-codereview | |
| parent | 66a7c2dab7b44ca6df91f7d79864cda77389d9a2 (diff) | |
| download | go-x-review-75c7dd3283afd1180780ec7571df4f5edcd08ddf.tar.xz | |
git-codereview: document short names in mail command
While we're here, fix bug in git-codereview gofmt usage message.
Change-Id: I547b8ae6fab01db1bc6b44b0e706d8faadbb60a9
Reviewed-on: https://go-review.googlesource.com/2781
Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'git-codereview')
| -rw-r--r-- | git-codereview/doc.go | 13 | ||||
| -rw-r--r-- | git-codereview/gofmt.go | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/git-codereview/doc.go b/git-codereview/doc.go index 8f57107..566b82a 100644 --- a/git-codereview/doc.go +++ b/git-codereview/doc.go @@ -8,7 +8,9 @@ server. The git-codereview tool manages "change branches" in the local git repository. Each such branch tracks a single commit, or "pending change", -that is reviewed using a Gerrit server. +that is reviewed using a Gerrit server; the Gerrit remote must be +named 'origin' in the local git repo. + Modifications to the pending change are applied by amending the commit. This process implements the "single-commit feature branch" model. @@ -122,10 +124,13 @@ The -r and -cc flags identify the email addresses of people to do the code review and to be CC'ed about the code review. Multiple addresses are given as a comma-separated list. -The mail command fails if there are staged changes that are not committed. The --f flag overrides this behavior. +An email address passed to -r or -cc can be shortened from name@domain to name. +The mail command resolves such shortenings by reading the list of past reviewers +from the git repository log to find email addresses of the form name@somedomain +and then, in case of ambiguity, using the reviewer who appears most often. -The mail command assumes that the Gerrit remote is called 'origin'. +The mail command fails if there are staged changes that are not committed. +The -f flag overrides this behavior. The mail command updates the tag <branchname>.mailed to refer to the commit that was most recently mailed, so running 'git diff <branchname>.mailed' diff --git a/git-codereview/gofmt.go b/git-codereview/gofmt.go index 93da314..f9644a0 100644 --- a/git-codereview/gofmt.go +++ b/git-codereview/gofmt.go @@ -21,7 +21,7 @@ func gofmt(args []string) { flags.BoolVar(&gofmtList, "l", false, "list files that need to be formatted") flags.Parse(args) if len(flag.Args()) > 0 { - fmt.Fprintf(stderr(), "Usage: %s gofmt %s [-l]\n", globalFlags, os.Args[0]) + fmt.Fprintf(stderr(), "Usage: %s gofmt %s [-l]\n", os.Args[0], globalFlags) os.Exit(2) } |
