Fix firing ref update event for change creation

Because of Ic888248f1fec27a5f9d84afc85ac035eecfa6607 which removed
the duplicate ref updates for refs/changes/*. The ref update event will
not be fired in ChangeInserter anymore.

Add the ref update event back when BatchRefUpdate process commands.

Change-Id: Ie9a132e107def33bdd513b7854b50de911edba0d
This commit is contained in:
Zhen Chen
2017-01-31 10:15:26 -08:00
parent 2932d5502b
commit ee28219aa0

View File

@@ -652,12 +652,8 @@ public class ReceiveCommits {
}
}
if (!MagicBranch.isMagicBranch(refName)
&& !refName.startsWith(REFS_CHANGES)) {
if (!MagicBranch.isMagicBranch(refName)) {
logDebug("Firing ref update for {}", c.getRefName());
// We only fire gitRefUpdated for direct refs updates.
// Events for change refs are fired when they are created.
//
gitRefUpdated.fire(project.getNameKey(), c, user.getAccount());
} else {
logDebug("Assuming ref update event for {} has fired",