ReceiveCommits: Set push certificate on BatchRefUpdate

ReceiveCommits ensures all commands from the wire are processed,
including both direct commands (e.g. push to branch) and indirect
commands (push for review). The final contents of the BatchRefUpdate
are a superset of the commands that are listed in this push
certificate; this is fine, as upstream's PushCertificateStore
includes a mechanism for filtering out the excess later.

dO NOT SUBMIT: Won't compile until we upgrade JGit past
https://git.eclipse.org/r/52020

Change-Id: I926441dcf1d9d22eb8754b03cc6aa9966db44f80
This commit is contained in:
Dave Borowitz 2015-07-15 18:25:48 -07:00
parent b82e74646e
commit 37163dd5c3

View File

@ -557,6 +557,7 @@ public class ReceiveCommits {
commandProgress = progress.beginSubTask("refs", UNKNOWN);
batch = repo.getRefDatabase().newBatchUpdate();
batch.setPushCertificate(rp.getPushCertificate());
batch.setRefLogIdent(rp.getRefLogIdent());
batch.setRefLogMessage("push", true);