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: includes diff in CL description #9658

Closed
wathiede opened this issue Jan 22, 2015 · 3 comments
Closed

x/review/git-codereview: includes diff in CL description #9658

wathiede opened this issue Jan 22, 2015 · 3 comments

Comments

@wathiede
Copy link
Member

Steps to reproduce.

  1. Change a file.
  2. git checkout -b test-branch
  3. git commit -av -m "DO NOT REVIEW test in progress"
  4. git codereview mail

See http://golang.org/cl/3174/ for an example.

I'm not doing git codereview change anywhere in there and maybe I should be. My lack of reading the directions aside, the tool should tell me if I'm doing the wrong thing.

If skipping the git codereview change is expected to work, I think there must be a bug in the auto-create change code path that is slurping the diff into the description.

@mikioh mikioh changed the title review: git-codereview includes diff in CL description git-codereview: includes diff in CL description Jan 22, 2015
@adg
Copy link
Contributor

adg commented Jan 23, 2015

That's weird. It must be something wrong with the pre-commit hook.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title git-codereview: includes diff in CL description x/review/git-codereview: includes diff in CL description Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-review label Apr 14, 2015
@cmarcelo
Copy link
Contributor

Couldn't reproduce the issue. Following the same steps I produced

https://go-review.googlesource.com/#/c/19816/

@ysmolski
Copy link
Member

ysmolski commented Nov 6, 2018

On a freshly installed repo (for which I did not have hooks) it returned following:

% git mail
remote: Processing changes: refs: 1, done
remote: ERROR: commit 4cca701: missing Change-Id in message footer
remote:
remote: Hint: to automatically insert a Change-Id, install the hook:
remote: f=`git rev-parse --git-dir`/hooks/commit-msg ; curl -Lo $f https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x $f
remote: and then amend the commit:
remote:   git commit --amend
remote: Finally, push your changes again
remote:
To https://go.googlesource.com/net
 ! [remote rejected] HEAD -> refs/for/master (commit 4cca701: missing Change-Id in message footer)
error: failed to push some refs to 'https://go.googlesource.com/net'
(running: git push -q origin HEAD:refs/for/master)
/Users/thorn/go/bin/git-codereview: exit status 1

When I had hooks installed then it produced this CL: https://go-review.googlesource.com/c/net/+/147738

Closing since cannot reproduce.

@ysmolski ysmolski closed this as completed Nov 6, 2018
@golang golang locked and limited conversation to collaborators Nov 6, 2019
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

7 participants