Fix: draft patch set is published by cherrypicking
If a draft patch set is cherrypicked onto the same destination change, i.e. as a shortcut to rebasing, the newly created patch set is not draft. Set the draft status of the newly created patch set to the same as the source patch set. Change-Id: I1e6e123171ee4257a784ab79f520810975b45644
This commit is contained in:
@@ -196,8 +196,10 @@ public class CherryPickChange {
|
||||
final PatchSetInserter inserter = patchSetInserterFactory
|
||||
.create(git, revWalk, refControl, currentUser, change, cherryPickCommit);
|
||||
final PatchSet.Id newPatchSetId = inserter.getPatchSetId();
|
||||
final PatchSet current = db.patchSets().get(change.currentPatchSetId());
|
||||
inserter
|
||||
.setMessage("Uploaded patch set " + newPatchSetId.get() + ".")
|
||||
.setDraft(current.isDraft())
|
||||
.insert();
|
||||
return change.getId();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user