code: @RequestMapping(value = "changelog/diff", method = RequestMethod.GET)
      public ResponseEntity<String> diff(FileDiffChangeLogRequest request) {
          // Null proof
          FileDiffChangeLogRequest nonNullRequest = request != null ? request : new FileDiffChangeLogRequest();
          // Gets the change log
          GitChangeLog changeLog = gitService.changeLog(nonNullRequest);
          // Diff export
          String diff = gitService.diff(
                  changeLog,
                  nonNullRequest.getPatterns()
          );
          // Content type
          HttpHeaders responseHeaders = new HttpHeaders();
          responseHeaders.set("Content-Type", "text/plain");
          // Body and headers
          return new ResponseEntity<>(diff, responseHeaders, HttpStatus.OK);
      }
docs: File diff change log