$PSVersionTable.GitCommitId
returns commit id (sha1 short or long)
returns version of powershell 7.0.3 (tag)
Name Value
---- -----
PSVersion 7.0.3
PSEdition Core
GitCommitId 7.0.3
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
I believe this is expected for release versions, since it's the git tag for that commit. @SteveL-MSFT can probably correct me if I'm wrong 馃檪
@vexx32 is correct. See my comment in code:
https://github.com/PowerShell/PowerShell/blob/67bdf7292db700f5fecb9337d17b29457ae14ed2/src/System.Management.Automation/engine/PSVersionInfo.cs#L82-L93
(@vexx32 Be Merciful - Steve receives hundreds of notifications and fails to respond to all.)
@vexx32 if the couple "tag and commit" (e.g. v7.0.3 and 380e7db) remain unchanged forever, and patches are going only into the next version, then it might be ok.
Most helpful comment
I believe this is expected for release versions, since it's the git tag for that commit. @SteveL-MSFT can probably correct me if I'm wrong 馃檪