Skip to content

Commit

Permalink
Allow arbitrary branch names for non-detached HEADs
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu authored Apr 26, 2017
1 parent bde306d commit 533df87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GitInfo/build/GitInfo.targets
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
<_GitHead>$([System.IO.Path]::Combine($(GitDir), 'HEAD'))</_GitHead>
<_GitHead>$([System.IO.Path]::GetFullPath($(_GitHead)))</_GitHead>
<_GitHead>$([System.IO.File]::ReadAllText('$(_GitHead)'))</_GitHead>
<GitBranch>$([System.Text.RegularExpressions.Regex]::Match($(_GitHead), '(?&lt;=/)[^/]+$'))</GitBranch>
<GitBranch>$([System.Text.RegularExpressions.Regex]::Match($(_GitHead), '(?&lt;=refs/heads/).+$'))</GitBranch>
<GitBranch>$(GitBranch.Trim())</GitBranch>
</PropertyGroup>

Expand Down

0 comments on commit 533df87

Please sign in to comment.