Skip to content

Commit

Permalink
Merge pull request #512 from dahlbyk/gh505
Browse files Browse the repository at this point in the history
Fix duplicate branch names
  • Loading branch information
dahlbyk authored Dec 14, 2017
2 parents 65658bf + d96a350 commit 4e95488
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/GitTabExpansion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,12 @@ function GitTabExpansionInternal($lastBlock, $GitStatus = $null) {

# Handles git checkout <ref>
"^(?:checkout).* (?<ref>\S*)$" {
gitBranches $matches['ref'] $true
gitRemoteUniqueBranches $matches['ref']
gitTags $matches['ref']
& {
gitBranches $matches['ref'] $true
gitRemoteUniqueBranches $matches['ref']
gitTags $matches['ref']
# Return only unique branches (to eliminate duplicates where the branch exists locally and on the remote)
} | Select-Object -Unique
}

# Handles git worktree add <path> <ref>
Expand Down

0 comments on commit 4e95488

Please sign in to comment.