| Issue 2130: | "Cherry Pick To" allows passing through of changes without a Change-Id | |
| 4 people starred this issue and may be notified of changes. | Back to list |
Affected Version: 2.7-rc2-505-g7502a46 What steps will reproduce the problem? 1. Resubmit a change (rebased) that was previously reverted (e.g. Create a change A for master; Merge A; Revert A (creates change B); Merge B;) 2. On A (merged, closed), click "Cherry Pick To" and point it to master. 3. A warning will tell you that the change-id used in the commit message is already used in the master branch and that change (change A) is closed. Try again, this time removing the Change-Id line from the text area in the "Cherry Pick To" dialog. What is the expected output? What do you see instead? Similar to the git-review utility, I would expect Gerrit to automatically create a new change-id. Or at the very least throw a warning before the change is created about missing Change-Id. Instead it just creates the change without a Change-Id. Thus making it (afaik) impossible to amend that change from the command line further as it can't be checked our and submitted back by Change-Id. Please provide any additional information below. Example of the above happening: https://gerrit.wikimedia.org/r/#/c/84698/
Sep 17, 2013
#1
krinklemail@gmail.com
Sep 18, 2013
Commits created by Gerrit skip some parts of the validation. The problem here is that the Change-Id is not being added onto the generated cherry-pick commit.
If you compare to the revert feature, the Change-Id is added:
In ChangeUtil.java method "public static Change.Id revert":
final ObjectId computedChangeId =
ChangeIdUtil.computeChangeId(parentToCommitToRevert.getTree(),
commitToRevert, authorIdent, myIdent, message);
revertCommitBuilder.setMessage(ChangeIdUtil.insertId(message, computedChangeId, true));
> impossible to amend that change from the command line
>
A missing Change-Id does not prevent you from fetching the change. You can still fetch it with the refspec, using the download commands on the change screen.
Then if you amend the change on the command line you can push it as a new patch set with:
$ git push origin HEAD:refs/changes/84698
Sep 18, 2013
(No comment was entered for this change.)
Status:
Accepted
Sep 30, 2013
(No comment was entered for this change.)
Status:
Submitted
Labels: FixedIn-2.8
Dec 9, 2013
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |