Skip to content

Commit

Permalink
Only print the first four log entries
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Apr 25, 2023
1 parent f6e974e commit 480363f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/DoMerges.java
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ private static boolean checkAlreadyMerged(String ver, List<String[]> gitLogs, St
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()) {
Expand All @@ -557,11 +557,15 @@ private static boolean checkAlreadyMerged(String ver, List<String[]> gitLogs, St
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) {
Expand Down

0 comments on commit 480363f

Please sign in to comment.