-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: Documentation and tool behavior don't match for 'git codereview change' #26012
Comments
I've always used I think it was added in the recent rewrite of the contribution guide. It may be useful to investigate why it was changed. |
Looks like it was added in the huge rewrite commit: a3d8326 It doesn't seem any reason was included in the commit messages or in the review comments, so I'm not sure it explains much. |
CC @rasky |
Works for me. You don't see the |
@rasky It isn't there for |
I think the suggestion should be reverted to use |
@dwbuiten no: I did on @ALTree: I disagree that it should be reverted. The contribute guide isn't meant to be a comprehensive reference for experienced or regular contributors; it is a tutorial for newcomers. The less concepts we force them to learn to send the first patch, the better. Creating a branch for a patch is part of a standard workflow that most (all) git users will know; asking them to use |
I think I now understand what it is going on: in each repo, the hooks are installed as side-effect on the first codereview command. So if you run |
@rasky That explains a lot, like why some others couldn't reproduce. Thanks! I guess there's always the ugly route of something like |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10.3 linux/amd64
What version of git-codereview are you using?
golang/review@3faf270
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
Cloned the
x/image
repo as per its README:Signed up for and setup cookies for Go's Gerrit system (I had already set it up since previosly contributing, technically.)
Installed
git-codereview
as per the documentation:Created a new branch for work, and did my changes, as per the documentation:
What did you expect to see?
I expected
git codereview change
to add aChange-Id:
line to the commit messages.What did you see instead?
It did not add a
Change-Id:
to the commit message.Workaround / extra information which could be important
If I do not follow the documentation, and instead of using
git checkout -b newbranch
, I usegit codereview change newbranch
, it does add theChange-Id:
line as required. But this does not match what the official documentation on golang.org says to do. It is also worth noting this occurs on the x/imagerepo; I haven't tried the official
go` repo.The text was updated successfully, but these errors were encountered: