Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix display of symbolic ref

  • Loading branch information...
commit 4b04981db17c9e1e6edb8c1292f46509743f0d41 1 parent e940ca5
@dahlbyk dahlbyk authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 GitUtils.ps1
View
9 GitUtils.ps1
@@ -42,9 +42,9 @@ function Get-GitBranch($gitDir = $(Get-GitDirectory), [Diagnostics.Stopwatch]$sw
$r = '|BISECTING'
}
- $b = '({0})' -f (
- Coalesce-Args `
- { dbg 'Trying symbolic-ref' $sw; git symbolic-ref HEAD 2>$null } `
+ $b = Coalesce-Args `
+ { dbg 'Trying symbolic-ref' $sw; git symbolic-ref HEAD 2>$null } `
+ { '({0})' -f (Coalesce-Args `
{ dbg 'Trying describe' $sw; git describe --exact-match HEAD 2>$null } `
{
dbg 'Falling back on parsing HEAD' $sw
@@ -57,9 +57,10 @@ function Get-GitBranch($gitDir = $(Get-GitDirectory), [Diagnostics.Stopwatch]$sw
return 'unknown'
}
}
- )
+ ) }
}
+ dbg 'Inside git directory?' $sw
if ('true' -eq $(git rev-parse --is-inside-git-dir 2>$null)) {
dbg 'Inside git directory' $sw
if ('true' -eq $(git rev-parse --is-bare-repository 2>$null)) {
Please sign in to comment.
Something went wrong with that request. Please try again.