private static @Nullable GitPushNativeResult parseRefResult(Matcher matcher, String line) {
    String flag = matcher.group(1);
    String from = matcher.group(2);
    String to = matcher.group(3);
    String summary = matcher.group(4).trim(); // the summary can have a trailing space (to simplify the regexp)
    @Nullable String reason = matcher.group(5);

    GitPushNativeResult.Type type = parseType(flag);
    if (type == null) {
      LOG.error("Couldn't parse push result type from flag [" + flag + "] in [" + line + "]");
      return null;
    }
    if (matcher.groupCount() < 4) {
      return null;
    }
    String range = RANGE.matcher(summary).matches() ? summary : null;
    return new GitPushNativeResult(type, from, reason, range);
  }
private static @Nullable GitPushNativeResult parseRefResult(Matcher matcher, String line)