public void deleteAsset(final JGitPathImpl path) {
final Pair<PathType, ObjectId> result = checkPath(path.getFileSystem().gitRepo(), path.getRefTree(), path.getPath());
if (result.getK1().equals(PathType.DIRECTORY)) {
throw new DirectoryNotEmptyException(path.toString());
}
if (result.getK1().equals(NOT_FOUND)) {
throw new NoSuchFileException(path.toString());
}
JGitUtil.delete(path.getFileSystem().gitRepo(), path.getRefTree(), path.getPath(), null, null, "delete {" + path.getPath() + "}", null, null);
}