Skip to content

Commit

Permalink
Using simpler git command to get current commit
Browse files Browse the repository at this point in the history
Fixes #355, supersedes #350
  • Loading branch information
kzu committed Sep 10, 2024
1 parent 4d79857 commit 229d2c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GitInfo/build/GitInfo.targets
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@
</Target>

<Target Name="_GitCommit" DependsOnTargets="_GitRoot" Returns="$(GitCommit)" Condition="'$(GitRoot)' != '' and '$(GitCommit)' == ''">
<Exec Command="$(GitExe) -c log.showSignature=false log --format=format:$(_ShortShaFormat) -n 1"
<Exec Command="$(GitExe) rev-parse --short HEAD"
EchoOff="true"
ConsoleToMSBuild="true"
ContinueOnError="true"
Expand All @@ -451,7 +451,7 @@
<GitCommit>$(GitDefaultCommit)</GitCommit>
</PropertyGroup>

<Exec Command="$(GitExe) -c log.showSignature=false log --format=format:$(_LongShaFormat) -n 1"
<Exec Command="$(GitExe) rev-parse HEAD"
EchoOff="true"
ConsoleToMSBuild="true"
ContinueOnError="true"
Expand Down Expand Up @@ -945,4 +945,4 @@
<PropertyGroup>
<GitInfoImported>true</GitInfoImported>
</PropertyGroup>
</Project>
</Project>

0 comments on commit 229d2c0

Please sign in to comment.