Fixed crash when creating the graph if the repo contains tags that point to blobs
This commit is contained in:
parent
14eb5f8c9c
commit
b68135d3a4
@ -117,8 +117,12 @@ class GraphWalk(private var repository: Repository?) : RevWalk(repository) {
|
|||||||
is RevCommit -> markStart(refTarget)
|
is RevCommit -> markStart(refTarget)
|
||||||
// RevTag case handles commits without branches but only tags.
|
// RevTag case handles commits without branches but only tags.
|
||||||
is RevTag -> {
|
is RevTag -> {
|
||||||
|
if(refTarget.`object` is RevCommit) {
|
||||||
val commit = lookupCommit(refTarget.`object`)
|
val commit = lookupCommit(refTarget.`object`)
|
||||||
markStart(commit)
|
markStart(commit)
|
||||||
|
} else {
|
||||||
|
println("Tag ${refTarget.tagName} is pointing to ${refTarget.`object`::class.simpleName}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: MissingObjectException) {
|
} catch (e: MissingObjectException) {
|
||||||
|
Loading…
Reference in New Issue
Block a user