Fixed tags not being properly detected as tags in the graph

This commit is contained in:
Abdelilah El Aissaoui 2022-02-01 14:29:18 +01:00
parent de9e982ff3
commit c746f845ee

View File

@ -46,17 +46,17 @@ val Ref.isBranch: Boolean
} }
val Ref.isTag: Boolean val Ref.isTag: Boolean
get() = this is ObjectIdRef.PeeledTag get() = this.name.startsWith(Constants.R_TAGS)
val Ref.isLocal: Boolean val Ref.isLocal: Boolean
get() = !this.isRemote get() = !this.isRemote
val Ref.isRemote: Boolean val Ref.isRemote: Boolean
get() = this.name.startsWith("refs/remotes/") get() = this.name.startsWith(Constants.R_REMOTES)
fun Ref.isSameBranch(otherRef: Ref?): Boolean { fun Ref.isSameBranch(otherRef: Ref?): Boolean {
if (this.name == "HEAD" && otherRef == null) if (this.name == Constants.HEAD && otherRef == null)
return true return true
if (otherRef == null) if (otherRef == null)