diff --git a/src/main/java/astmergeevaluation/FindMergeCommits.java b/src/main/java/astmergeevaluation/FindMergeCommits.java index 005fe947dc..e8a6effe00 100644 --- a/src/main/java/astmergeevaluation/FindMergeCommits.java +++ b/src/main/java/astmergeevaluation/FindMergeCommits.java @@ -235,7 +235,7 @@ static List reposFromCsv(String inputFileName) throws IOException, G * @throws GitAPIException if there is trouble running Git commands */ void writeMergeCommitsForRepos() throws IOException, GitAPIException { - System.out.printf("Finding merge commits for %d repositories.%n", repos.size()); + System.out.printf("FindMergeCommits: %d repositories.%n", repos.size()); // Parallel execution for each repository. repos.parallelStream().forEach(this::writeMergeCommitsForRepo); } @@ -246,7 +246,7 @@ void writeMergeCommitsForRepos() throws IOException, GitAPIException { * @param orgAndRepo the GitHub organization name and repository name */ void writeMergeCommitsForRepo(OrgAndRepo orgAndRepo) { - String msgPrefix = StringsPlume.rpad("Find merge commits: " + orgAndRepo + " ", 69) + " "; + String msgPrefix = StringsPlume.rpad("FindMergeCommits: " + orgAndRepo + " ", 69) + " "; System.out.println(msgPrefix + "STARTED"); try { writeMergeCommits(orgAndRepo); @@ -525,11 +525,14 @@ List withoutDuplicateBranches(List branches) { return history1.get(commonPrefixLength - 1); } catch (Exception e) { - throw new Error(e); + throw new Error( + String.format("getMergeBaseCommit(%s, %s, %s, %s)", git, repo, commit1, commit2), e); } } - // This doesn't work; I don't know why. + // I got the error + // java.lang.Error: org.eclipse.jgit.errors.MissingObjectException: Missing unknown + // 7f8b42c391eaa92fdfcaae4e7cb37cc84be91d4e // Maybe see https://www.eclipse.org/forums/index.php/t/1091725/ ?? /** * Given two commits, return their merge base commit. It is the nearest ancestor of both commits. @@ -563,7 +566,8 @@ RevCommit getMergeBaseCommit2(Git git, Repository repo, RevCommit commit1, RevCo "Wrong number of base commits for getMergeBaseCommit(%s, \"%s\", \"%s\"): %s", repo, commit1, commit2, baseCommits)); } catch (IOException e) { - throw new Error(e); + throw new Error( + String.format("getMergeBaseCommit2(%s, %s, %s, %s)", git, repo, commit1, commit2), e); } } @@ -603,7 +607,8 @@ RevCommit getMergeBaseCommit3(Git git, Repository repo, RevCommit commit1, RevCo } return baseCommit; } catch (Exception e) { - throw new Error(e); + throw new Error( + String.format("getMergeBaseCommit3(%s, %s, %s, %s)", git, repo, commit1, commit2), e); } } }