mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-22 00:09:47 +01:00
added message to NoCommonHistoryException
This commit is contained in:
@@ -735,7 +735,8 @@ public final class GitUtil
|
||||
mergeBaseWalk.markStart(mergeBaseWalk.parseCommit(revision2));
|
||||
RevCommit ancestor = mergeBaseWalk.next();
|
||||
if (ancestor == null) {
|
||||
throw new NoCommonHistoryException();
|
||||
String msg = "revisions %s and %s are not related and therefore do not have a common ancestor";
|
||||
throw new NoCommonHistoryException(String.format(msg, revision1.name(), revision2.name()));
|
||||
}
|
||||
return ancestor.getId();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user