PowerShell / PowerShell/PowerShell

PSVersionTable.GitCommitId is not an actual tag

Open
#19,773 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs-Triage WG-Maintainers-Build
Dominant language
C#
Stars
55.5k
Forks
8.5k
Avg merge
1d 2h
Merged PRs (30d)
88

Description

Prerequisites
Steps to reproduce

According to #13797 $PSVersionTable.GitCommitId should be a valid tag for release versions (which totally makes sense), but it returns 7.3.4, and you are tagging with v7.3.4.

I think you are just taking [assembly: AssemblyInformationalVersion("7.3.4 SHA: b59f05d5a1b2fceca231f75c53c203a02edf6203")] which does not have v prefix.

Furthermore you are shipping b9f05, but tagging 17b3f with v7.3.4.

17b3f0628 (HEAD, tag: v7.3.4) Merged PR 25327: Update changelog for v7.3.4 release
b59f05d5a Update ThirdPartyNotices.txt

Not a big problem for me.

Expected behavior
Be able to do git checkout $PSVersionTable.GitCommitId to build the same sources I am currently using in the shipped Pwsh.
Actual behavior
The tag does not exist.
Error details

No response

Environment data
$psversionTable

Name                           Value
----                           -----
PSVersion                      7.3.4
PSEdition                      Core
GitCommitId                    7.3.4
OS                             Microsoft Windows 10.0.22623
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how $PSVersionTable.GitCommitId is populated from the assembly informational version and how release tags are produced; the issue identifies the 7.3.4 value, the v7.3.4 tag, and differing commit SHAs. Done means the reported identifier resolves to the sources shipped in the release and git checkout $PSVersionTable.GitCommitId can reproduce them.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, shell
Domain
release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.