all: gofmt
Gofmt to update doc comments to the new formatting.
For golang/go#51082.
Change-Id: I257fdc6811a1156714d7c7934f6256f07a460b9d
Reviewed-on: https://go-review.googlesource.com/c/review/+/399618
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
diff --git a/git-codereview/doc.go b/git-codereview/doc.go
index a74d7d4..75082d4 100644
--- a/git-codereview/doc.go
+++ b/git-codereview/doc.go
@@ -53,7 +53,7 @@
sync = codereview sync
sync-branch = codereview sync-branch
-Single-Commit Work Branches
+# Single-Commit Work Branches
For simple, unrelated changes, the typical usage of the git-codereview tool
is to place each pending change in its own Git branch.
@@ -69,7 +69,7 @@
The “git codereview mail” and “git codereview submit” commands
implicitly operate on the lone pending change.
-Multiple-Commit Work Branches
+# Multiple-Commit Work Branches
Of course, it is not always feasible to put each pending change in a separate branch.
A sequence of changes that build on one another is more easily
@@ -98,7 +98,7 @@
Instead it is necessary to run “git codereview sync” explicitly
(when ready) after “git codereview submit”.
-Reusing Work Branches
+# Reusing Work Branches
Although one common practice is to create a new branch for each pending change,
running “git codereview submit” (and possibly “git codereview sync”)
@@ -107,7 +107,7 @@
(“git change work”) and then do all work in that branch,
possibly in the multiple-commit mode, never changing between branches.
-Commands
+# Commands
All commands accept these global flags:
@@ -118,7 +118,7 @@
These are omitted from the per-command descriptions below.
-Branchpoint
+# Branchpoint
The branchpoint command prints the commit hash of the most recent commit
on the current branch that is shared with the Gerrit server.
@@ -130,7 +130,7 @@
“git diff $(git codereview branchpoint)” or
“git log $(git codereview branchpoint)..HEAD”.
-Change
+# Change
The change command creates and moves between Git branches and maintains the
pending changes on work branches.
@@ -167,7 +167,7 @@
treated a GitHub pull request number, and the change command downloads the latest
version of that pull request. In this case, the /P suffix is disallowed.
-Gofmt
+# Gofmt
The gofmt command applies the gofmt program to all files modified in the
current work branch, both in the staging area (index) and the working tree
@@ -180,13 +180,13 @@
place. That is, files in the staging area are reformatted in the staging area,
and files in the working tree are reformatted in the working tree.
-Help
+# Help
The help command displays basic usage instructions.
git codereview help
-Hooks
+# Hooks
The hooks command installs the Git hooks to enforce code review conventions.
@@ -205,7 +205,7 @@
This hook installation is also done at startup by all other git codereview
commands, except “git codereview help”.
-Hook-Invoke
+# Hook-Invoke
The hook-invoke command is an internal command that invokes the named Git hook.
@@ -213,7 +213,7 @@
It is run by the shell scripts installed by the “git codereview hooks” command.
-Mail
+# Mail
The mail command starts the code review process for the pending change.
@@ -266,7 +266,7 @@
commit that was most recently mailed, so running “git diff <branchname>.mailed”
shows diffs between what is on the Gerrit server and the current directory.
-Pending
+# Pending
The pending command prints to standard output the status of all pending changes
and staged, unstaged, and untracked files in the local repository.
@@ -284,7 +284,7 @@
Useful aliases include “git p” for “git pending” and “git pl” for “git pending -l”
(notably faster but without Gerrit information).
-Rebase-work
+# Rebase-work
The rebase-work command runs git rebase in interactive mode over pending changes.
@@ -298,7 +298,7 @@
In multiple-commit workflows, rebase-work is used so often that it can be helpful
to alias it to “git rw”.
-Reword
+# Reword
The reword command edits pending commit messages.
@@ -320,7 +320,7 @@
branch, but it can also be useful in single-commit work branches to allow
editing a commit message without committing staged changes at the same time.
-Submit
+# Submit
The submit command pushes the pending change to the Gerrit server and tells
Gerrit to submit it to the upstream branch.
@@ -347,7 +347,7 @@
After a successful sync, the branch can be used to prepare a new change.
-Sync
+# Sync
The sync command updates the local repository.
@@ -356,7 +356,7 @@
It fetches commits from the remote repository and merges them from the
upstream branch to the current branch, rebasing any pending changes.
-Sync-branch
+# Sync-branch
The sync-branch command merges changes from the parent branch into
the current branch.
@@ -388,7 +388,7 @@
be configured to mail changes to the parent branch instead of the
dev branch.
-Configuration
+# Configuration
If a file named codereview.cfg is present in the repository root,
git-codereview will use it for configuration. It should contain lines
diff --git a/git-codereview/go19_test.go b/git-codereview/go19_test.go
index c2dc46e..999769d 100644
--- a/git-codereview/go19_test.go
+++ b/git-codereview/go19_test.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.9
// +build go1.9
package main