private boolean handleGetDiffs(HttpServletRequest request, HttpServletResponse response, Repository db, String scope, String pattern) throws Exception {
DiffCommand command = getDiff(request, response, db, scope, pattern, NullOutputStream.INSTANCE);
if (command == null)
return true;
List<DiffEntry> l = command.call();
JSONArray diffs = new JSONArray();
URI diffLocation = getURI(request);
if (pattern != null) {
IPath patternPath = new Path(pattern);
IPath diffPath = new Path(diffLocation.getPath());