private static void parseChanges(@NotNull VirtualFile vcsRoot,
                                   @NotNull StringScanner s,
                                   @NotNull FileStatusLineConsumer consumer) throws VcsException {
    while (s.hasMoreData()) {
      FileStatus status = null;
      if (s.isEol()) {
        s.nextLine();
        continue;
      }
      if ("CADUMRT".indexOf(s.peek()) == -1) {
        // exit if there is no next character
        return;
      }
      String[] tokens = s.line().split("\t");
      final FilePath before;
      final FilePath after;
      final String path = tokens[tokens.length - 1];
      final FilePath filePath = GitContentRevision.createPathFromEscaped(vcsRoot, path);
      switch (tokens[0].charAt(0)) {
        case 'C':
        case 'A':
          status = FileStatus.ADDED;
          before = null;
          after = filePath;
          break;
        case 'U':
          status = FileStatus.MERGED_WITH_CONFLICTS;
        case 'M':
          if (status == null) {
            status = FileStatus.MODIFIED;
          }
          before = filePath;
          after = filePath;
          break;
        case 'D':
          status = FileStatus.DELETED;
          before = filePath;
          after = null;
          break;
        case 'R':
          status = FileStatus.MODIFIED;
          before = GitContentRevision.createPathFromEscaped(vcsRoot, tokens[1]);
          after = filePath;
          break;
        case 'T':
          status = FileStatus.MODIFIED;
          before = filePath;
          after = filePath;
          break;
        default:
          throw new VcsException(GitBundle.message("error.git.parse.unknown.file.status", Arrays.asList(tokens)));
      }
      consumer.consume(status, before, after);
    }
  }
private static void parseChanges(@NotNull VirtualFile vcsRoot,
                                   @NotNull StringScanner s,
                                   @NotNull FileStatusLineConsumer consumer)