Skip to content

Commit

Permalink
Use rev-parse --abbrev-ref
Browse files Browse the repository at this point in the history
Hat tip @adymitruk
  • Loading branch information
dahlbyk committed Aug 11, 2012
1 parent 4b5dc8a commit 48728fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GitUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ function Stop-SshAgent() {
}

function Update-AllBranches($Upstream = 'master', [switch]$Quiet) {
$head = ?? (git symbolic-ref -q --short HEAD) (git rev-parse HEAD)
$head = git rev-parse --abbrev-ref HEAD
git checkout -q $Upstream
$branches = (git branch --no-color --no-merged) | where { $_ -notmatch '^\* ' }
foreach ($line in $branches) {
$branch = $line.SubString(2)
Expand Down

0 comments on commit 48728fc

Please sign in to comment.