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: give an error if the Change-Id: line is deleted #10386

Open
minux opened this issue Apr 8, 2015 · 2 comments
Open
Milestone

Comments

@minux
Copy link
Member

minux commented Apr 8, 2015

I think this is the reason why some CLs have more than one Gerrit
CL.

Given that using the same change to open a fresh new gerrit CL is
rarely needed, I think git-codereview should error out if the user
deletes the Change-Id: line (with git change).

And we can add a -f option to override the error (I'm also fine with
let the user git commit --amend to manually remove the Change-Id.)

Of course, git-codereview probably can't detect the case where
the user has used git commit --amend to remove the Change-Id,
but our contribution guideline uses git change, so the proposed
check should catch most problems.

@minux minux added this to the Go1.5Maybe milestone Apr 8, 2015
@josharian
Copy link
Contributor

Good idea. How would we propagate the necessary state from git change to the hook? We don't have much context in the hook at this point. In particular, I don't think we have enough context to distinguish this from a commit message coming from a new commit in the same branch (i.e. running regular git commit).

@rsc rsc changed the title codereview: given an error if the Change-Id: line is deleted x/review/git-codereview: give an error if the Change-Id: line is deleted Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Go1.5Maybe Apr 14, 2015
@rsc rsc removed the repo-review label Apr 14, 2015
@ysmolski
Copy link
Member

ysmolski commented Nov 5, 2018

IMHO, this cannot be done. I checked what @josharian said. The problem is reduced to: how do we detect that Change_id was removed at all? There is not enough info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants