GitPushRepoResult (GitPushNativeResult.Type nativeType, String from, String to, int commits, @Nullable GitUpdateResult updateResult) { String reason = nativeType == REJECTED ? GitPushNativeResult.FETCH_FIRST_REASON : null; GitPushNativeResult nr = new GitPushNativeResult(nativeType, from, reason, null); return GitPushRepoResult.addUpdateResult( convertFromNative(nr, Collections.emptyList(), commits, from(from), to(to)), updateResult); }