Skip to content

Commit 07c834a

Browse files
committed
getHeadCommit() returns null if branch is not found
1 parent b8d0350 commit 07c834a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/scm4j/vcs/svn/SVNVCS.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,9 @@ public VCSTag createTag(String branchName, String tagName, String tagMessage, St
642642

643643
protected SVNLogEntry revToSVNEntry(String branchName, Long rev) throws Exception {
644644
SVNDirEntry info = repository.info(branchName, rev);
645+
if (info == null) {
646+
return null;
647+
}
645648
@SuppressWarnings("unchecked")
646649
Collection<SVNLogEntry> entries = repository.log(new String[] {branchName}, null, info.getRevision(), info.getRevision(), true, true);
647650
if (entries != null) {

0 commit comments

Comments
 (0)