Added current branch icon to detached HEAD

This commit is contained in:
Abdelilah El Aissaoui 2021-12-07 00:02:49 +01:00
parent 6d190614e5
commit 5493451719
2 changed files with 9 additions and 6 deletions

View File

@ -27,6 +27,9 @@ val Ref.isRemote: Boolean
fun Ref.isSameBranch(otherRef: Ref?): Boolean { fun Ref.isSameBranch(otherRef: Ref?): Boolean {
if(this.name == "HEAD" && otherRef == null)
return true
if(otherRef == null) if(otherRef == null)
return false return false

View File

@ -438,7 +438,7 @@ fun CommitMessage(
isCurrentBranch = ref.isSameBranch(currentBranch), isCurrentBranch = ref.isSameBranch(currentBranch),
onCheckoutBranch = { onCheckoutRef(ref) }, onCheckoutBranch = { onCheckoutRef(ref) },
onMergeBranch = { onMergeBranch(ref) }, onMergeBranch = { onMergeBranch(ref) },
onDeleteBranch = { onDeleteBranch(ref) } onDeleteBranch = { onDeleteBranch(ref) },
) )
} }
} }