Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/review/git-codereview: complain when branch upstream is not master and does not have a dot in it #12170

Closed
josharian opened this issue Aug 17, 2015 · 4 comments

Comments

@josharian
Copy link
Contributor

git-codereview attempts to put a branch prefix on CLs when they're not on master. It uses the branch upstream for this, which works until it doesn't.

There's at least one invariant we can use to detect that something has gone wrong: The upstream must be called master or have a dot in it.

cc @rsc

@josharian josharian added this to the Unreleased milestone Aug 17, 2015
@mikioh mikioh changed the title x/codereview: complain when branch upstream is not master and does not have a dot in it x/codereview/git-codereview: complain when branch upstream is not master and does not have a dot in it Aug 17, 2015
@mikioh mikioh changed the title x/codereview/git-codereview: complain when branch upstream is not master and does not have a dot in it x/review/git-codereview: complain when branch upstream is not master and does not have a dot in it Aug 17, 2015
@4ad
Copy link
Member

4ad commented Sep 2, 2015

I'm also hit by this. git-codereview is trying way, way too hard. It should do something much safer, and much simpler.

IFF branchBranchName.Matches("^dev\.")
    addPrefix()

That's it.

The upstream must be called master or have a dot in it.

For it to do anything, yes, however, it should not complain otherwise. It should just ignore it and do nothing. Otherwise it means I can't push to my own github without codereview interfering.

@mwhudson
Copy link
Contributor

mwhudson commented Sep 2, 2015

You can also just not use git-codereview (well, the hooks are nice, but I don't use it for interacting with gerrit any more).

@minux
Copy link
Member

minux commented Sep 2, 2015 via email

@gopherbot
Copy link

CL https://golang.org/cl/19560 mentions this issue.

@golang golang locked and limited conversation to collaborators Feb 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants