diff options
| author | Russ Cox <rsc@golang.org> | 2021-01-07 12:26:06 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2021-01-13 14:39:58 +0000 |
| commit | 4aa052da7f65ad6eeb77cce14ef70dac82d242cc (patch) | |
| tree | 774f94b2ae37b5e08a68504122663656f29e471c /git-codereview/doc.go | |
| parent | c4d5d8fb54f168c51827b4901b8537fca9a2abc6 (diff) | |
| download | go-x-review-4aa052da7f65ad6eeb77cce14ef70dac82d242cc.tar.xz | |
git-codereview: new sync-branch and related fixes
This CL adds a new command, "git codereview sync-branch",
which does the appropriate git merge for the current branch.
This CL also fixes a bug in "git codereview branchpoint",
and therefore also commands like "git codereview pending",
which was getting the branchpoint wrong for merges,
with the effect that a merge showed too many pending CLs.
This CL also fixes a bug in "git codereview change", which was
formerly willing to run "git checkout" with a pending merge,
which had the effect of flattening the merge mysteriously.
Now it detects the merge and refuses to run.
All of this should make merges easier and less error-prone
as we use dev branches more often.
With the earlier CL in this stack that allows working directly
on local branches, this is now a great way to run a merge
updating dev.regabi:
git change dev.regabi
git sync-branch
(with appropriate aliases to avoid typing "codereview").
Fixes golang/go#26201.
Change-Id: Ic24603123ca5135a72004309f5bb208ff149c9eb
Reviewed-on: https://go-review.googlesource.com/c/review/+/279772
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'git-codereview/doc.go')
| -rw-r--r-- | git-codereview/doc.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/git-codereview/doc.go b/git-codereview/doc.go index a72b6db..b9eb230 100644 --- a/git-codereview/doc.go +++ b/git-codereview/doc.go @@ -344,5 +344,27 @@ if different from the source repository. If set to “golang/go”, for example, lines such as “Fixes #123” in a commit message will be rewritten to “Fixes golang/go#123”. +The “branch” key specifies the name of the branch on the origin server +corresponding to the current checkout. If this setting is missing, git-codereview +uses the name of the remote branch that the current checkout is tracking. +If that setting is missing, git-codereview uses “main”. + +The “parent-branch” key specifies the name of the parent branch on +the origin server. The parent branch is the branch from which the current +pulls regular updates. For example the parent branch of “dev.feature” +would typically be “main”, in which case it would have this codereview.cfg: + + branch: dev.feature + parent-branch: main + +In a more complex configuration, one feature branch might depend upon +another, like “dev.feature2” containing follow-on work for “dev.feature”, +neither of which has merged yet. In this case, the dev.feature2 branch +would have this codereview.cfg: + + branch: dev.feature2 + parent-branch: dev.feature + +The parent branch setting is used by the sync-branch command. */ package main |
