Types/git.status/get_Ahead.ps1

<#
.SYNOPSIS
    Gets the commits ahead
.DESCRIPTION
    Gets the number of commits ahead of the remote branch.
#>

if ($this.Status -match 'ahead') {
    $this.Status -replace '\D' -as [int]
} else {
    0
}