This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/main by this push:
     new 480363f105 Only print the first four log entries
480363f105 is described below

commit 480363f105c12f33139cf81053c4d2babc117658
Author: Daniel Kulp <[email protected]>
AuthorDate: Tue Apr 25 09:04:54 2023 -0400

    Only print the first four log entries
---
 bin/DoMerges.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/DoMerges.java b/bin/DoMerges.java
index 2de928e9cd..ae456997b1 100644
--- a/bin/DoMerges.java
+++ b/bin/DoMerges.java
@@ -546,7 +546,7 @@ public class DoMerges {
         if (gitLogs == null) {
             return false;
         }
-        List<List<String>> matchingLogs = new LinkedList<>();
+        Set<List<String>> matchingLogs = new HashSet<>();
         for (String[] f : gitLogs) {
             List<String> ll = compareLogs(f, logLines);
             if (!ll.isEmpty()) {
@@ -557,11 +557,15 @@ public class DoMerges {
         if (!matchingLogs.isEmpty()) {
             //everything in the source log is in a log on this branch, let's 
prompt to record the merge
             System.out.println("Found possible commit(s) already on branch:");
+            int m = 0;
             for (List<String> f : matchingLogs) {
                 for (String s : f) {
                     System.out.println("    " + s);
                 }
                 System.out.println("------------------------");
+                if (++m == 4) {
+                    break;
+                }
             }
 
             while (System.in.available() > 0) {

Reply via email to