Notedb: Unify subject and patch set handling
When inserting patch sets, pass in a RevWalk along with the commit SHA-1 so we can ensure the body is parsed. Set the subject implicitly when we add a new patch set; always do this, even if the subject matches the previous subject. When parsing patch sets, we have to still parse the subject separately from the patch set, since there is no subject field on PatchSet. But we can use a single setter on Change to set the current patch set ID, subject, and original subject together as a batch, rather than going through PatchSetInfo. Change-Id: If37c4990e2e5888d5e87bd5c34a821e59186ab6d
This commit is contained in:
@@ -2273,7 +2273,7 @@ public class ReceiveCommits {
|
||||
|
||||
boolean draft = magicBranch != null && magicBranch.draft;
|
||||
newPatchSet = psUtil.insert(
|
||||
db, update, psId, newCommit, draft, newGroups,
|
||||
db, state.rw, update, psId, newCommit, draft, newGroups,
|
||||
rp.getPushCertificate() != null
|
||||
? rp.getPushCertificate().toTextWithSignature()
|
||||
: null);
|
||||
|
Reference in New Issue
Block a user