diff --git a/src/main/kotlin/app/git/graph/GraphWalk.kt b/src/main/kotlin/app/git/graph/GraphWalk.kt index cf4dc6c..a72eac4 100644 --- a/src/main/kotlin/app/git/graph/GraphWalk.kt +++ b/src/main/kotlin/app/git/graph/GraphWalk.kt @@ -117,8 +117,12 @@ class GraphWalk(private var repository: Repository?) : RevWalk(repository) { is RevCommit -> markStart(refTarget) // RevTag case handles commits without branches but only tags. is RevTag -> { - val commit = lookupCommit(refTarget.`object`) - markStart(commit) + if(refTarget.`object` is RevCommit) { + val commit = lookupCommit(refTarget.`object`) + markStart(commit) + } else { + println("Tag ${refTarget.tagName} is pointing to ${refTarget.`object`::class.simpleName}") + } } } } catch (e: MissingObjectException) {