Do not create refs for imports and cache-automerge refs

Change-Id: Id1884b2251c168f724c25cd449fafca0813f86e3
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/importer/GitFetchStep.java b/src/main/java/com/googlesource/gerrit/plugins/importer/GitFetchStep.java
index 2f7f2ba..2fc0f59 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/importer/GitFetchStep.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/importer/GitFetchStep.java
@@ -55,13 +55,19 @@
         ConfigureRepositoryStep.R_IMPORTS);
     for (Map.Entry<String, Ref> e : refs.entrySet()) {
       String name = e.getKey();
+      if (name.startsWith("imports/")) {
+        continue;
+      }
+      if (name.startsWith("cache-automerge/")) {
+        continue;
+      }
       if (name.startsWith("changes/")) {
         continue;
       }
       if (name.startsWith("users/") && name.contains("/edit")) {
         continue;
       }
-      String targetRef = Constants.R_REFS + e.getKey();
+      String targetRef = Constants.R_REFS + name;
       RefUpdate ru = repo.updateRef(targetRef);
       ru.setNewObjectId(e.getValue().getObjectId());
       RefUpdate.Result result = ru.forceUpdate();