aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/branch.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-01-07 12:26:06 -0500
committerRuss Cox <rsc@golang.org>2021-01-07 18:26:46 +0000
commit5617b8658c4ff7af5665cf0fd4bc5448d4ada7b9 (patch)
tree4cd9e48ad8aac87b2e669024fe7605ef7d49317d /git-codereview/branch.go
parent3f3690dc9cf1f7c0ddca72d1c5313be4022ece58 (diff)
downloadgo-x-review-5617b8658c4ff7af5665cf0fd4bc5448d4ada7b9.tar.xz
git-codereview: allow work on main branches
The only reason not to allow work on branches named for the origin branches is to preserve them for "git change main; git change new" to make a new branch tracking main. But we can still do that and allow commits on main - we just have to use the branchpoint as the root of the new branch. Now people can work on "main" (or "dev.regabi") if that suits them. In particular, if you're doing merges, it's nice to be on "dev.regabi" and know for sure that's the branch you're working on. Change-Id: I8e9458793c30857a5c00e6bfd4f1cb41adbbe637 Reviewed-on: https://go-review.googlesource.com/c/review/+/279874 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'git-codereview/branch.go')
-rw-r--r--git-codereview/branch.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/git-codereview/branch.go b/git-codereview/branch.go
index 2bd9fe9..7c9b282 100644
--- a/git-codereview/branch.go
+++ b/git-codereview/branch.go
@@ -116,11 +116,6 @@ func (b *Branch) FullName() string {
return b.Name
}
-// IsLocalOnly reports whether b is a local work branch (only local, not known to remote server).
-func (b *Branch) IsLocalOnly() bool {
- return "origin/"+b.Name != b.OriginBranch()
-}
-
// HasPendingCommit reports whether b has any pending commits.
func (b *Branch) HasPendingCommit() bool {
b.loadPending()