From 1494cfc1af6445968f7f9b569c91fc4602f84d26 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Tue, 22 Dec 2015 16:57:41 -0500 Subject: [PATCH] ReceiveCommits: Use result change from ChangeInserter The Change instance modified by ChangeInserter is no longer the same instance as the one passed into the factory. The result from getChange() is the one that has the change subject set from the new patch set commit message, so this is the one we need to use in ReceiveCommits. Change-Id: Ie38b73d8979efdc02935fbe488141598b852ecf6 --- .../main/java/com/google/gerrit/server/git/ReceiveCommits.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java index 9b3e70101a..02cc4512cd 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java @@ -1716,9 +1716,9 @@ public class ReceiveCommits { private class CreateRequest { final RevCommit commit; - final Change change; final ReceiveCommand cmd; final ChangeInserter ins; + Change change; boolean created; Collection groups; @@ -1808,6 +1808,7 @@ public class ReceiveCommits { bu.execute(); } created = true; + change = ins.getChange(); if (magicBranch != null && magicBranch.submit) { submit(projectControl.controlFor(change), ps);