diff --git a/server/src/main/java/com/linecorp/centraldogma/server/internal/mirror/GitMirror.java b/server/src/main/java/com/linecorp/centraldogma/server/internal/mirror/GitMirror.java index 3aac869ec9..82f4a6fae0 100644 --- a/server/src/main/java/com/linecorp/centraldogma/server/internal/mirror/GitMirror.java +++ b/server/src/main/java/com/linecorp/centraldogma/server/internal/mirror/GitMirror.java @@ -204,9 +204,13 @@ protected void mirrorRemoteToLocal(File workDir, CommandExecutor executor, final byte[] content = reader.open(objectId).getBytes(); switch (EntryType.guessFromPath(localPath)) { case JSON: - final JsonNode jsonNode = Jackson.readTree(content); + final JsonNode jsonNode = Jackson.readTree(content, EntryType.JSON); changes.putIfAbsent(localPath, Change.ofJsonUpsert(localPath, jsonNode)); break; + case YAML: + final JsonNode yamlNode = Jackson.readTree(content, EntryType.YAML); + changes.putIfAbsent(localPath, Change.ofYamlUpsert(localPath, yamlNode)); + break; case TEXT: final String strVal = new String(content, StandardCharsets.UTF_8); changes.putIfAbsent(localPath, Change.ofTextUpsert(localPath, strVal));