Revert "Use proper HEAD ref value when creating project"

The issue fixed by this commit was fixed in a different way on the
stable-2.14 branch. Reverting this on stable-2.15 will make the merge
from stable-2.14 easier.

This reverts commit e145010de7911623c98e6111537ffa4997d1a82e.

Change-Id: I7e44f62f119b7ed26c8d96bfe9ef8442ff687b29
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
index 28b5e6b..8521910 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -21,9 +21,7 @@
 import com.google.common.collect.LinkedListMultimap;
 import com.google.common.collect.ListMultimap;
 import com.google.common.collect.Sets;
-import com.google.gerrit.extensions.api.changes.NotifyHandling;
 import com.google.gerrit.extensions.events.GitReferenceUpdatedListener;
-import com.google.gerrit.extensions.events.NewProjectCreatedListener;
 import com.google.gerrit.extensions.restapi.AuthException;
 import com.google.gerrit.metrics.Timer1;
 import com.google.gerrit.reviewdb.client.Project;
@@ -401,24 +399,6 @@
       try {
         Ref head = git.exactRef(Constants.HEAD);
         if (replicationQueue.createProject(projectName, head != null ? head.getName() : null)) {
-          NewProjectCreatedListener.Event event =
-              new NewProjectCreatedListener.Event() {
-                @Override
-                public String getProjectName() {
-                  return projectName.get();
-                }
-
-                @Override
-                public String getHeadName() {
-                  return head != null ? head.getTarget().getName() : null;
-                }
-
-                @Override
-                public NotifyHandling getNotify() {
-                  return NotifyHandling.NONE;
-                }
-              };
-          replicationQueue.onNewProjectCreated(event);
           repLog.warn("Missing repository created; retry replication to " + uri);
           pool.reschedule(this, Destination.RetryReason.REPOSITORY_MISSING);
         } else {