) throws IOException {
final JsonArray trees = params.getJsonArray("tree");
for (final JsonValue val : trees) {
final JsonObject tree = (JsonObject) val;
final String sha = tree.getString("sha");
final Directives dirs = new Directives().xpath(this.xpath())
.add("tree");
for (final Entry<String, JsonValue> entry : tree.entrySet()) {
dirs.add(entry.getKey()).set(entry.getValue().toString()).up();
}
this.storage.apply(dirs);
final String ref;
if (tree.containsValue("name")) {
ref = tree.getString("name");