Skip to content

Accept tags in portsdiff and z-changelog.#1935

Merged
BillyONeal merged 1 commit into
microsoft:mainfrom
BillyONeal:accept-tags
Mar 4, 2026
Merged

Accept tags in portsdiff and z-changelog.#1935
BillyONeal merged 1 commit into
microsoft:mainfrom
BillyONeal:accept-tags

Conversation

@BillyONeal

Copy link
Copy Markdown
Member

In #1842 I broke portsdiff and z-changelog because the previous behavior checked only if git cat-file -t succeeded, not whether the target was actually a commit. By "fixing" that to actually check for commit that breaks tag inputs.

Using -e and ^{commit} was suggested by gpt-5.3-codex but it was unable to make the other changes.

Demonstration:

PS C:\Dev\vcpkg> .\vcpkg.exe z-changelog 2026.01.16
error: Invalid commit id: 2026.01.16
PS C:\Dev\vcpkg> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe z-changelog bogus
error: Invalid commit id: bogus
note: "C:\Program Files\Git\cmd\git.exe" -C "C:\Dev\vcpkg" -c core.autocrlf=false cat-file -e "bogus^{commit}" failed with exit code 128
fatal: Not a valid object name bogus^{commit}

PS C:\Dev\vcpkg> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe z-changelog 2026.01.16
#### Total port count: 2765
#### Total port count per triplet (tested): LINK
.
.
.

(Also with color:

the same console output above color screenshot

)

In microsoft#1842 I broke portsdiff and z-changelog because the previous behavior checked only if git cat-file -t succeeded, not whether the target was actually a commit. By "fixing" that to actually check for commit that breaks tag inputs.

Using -e and ^{commit} was suggested by gpt-5.3-codex but it was unable to make the other changes.

Demonstration:

```console
PS C:\Dev\vcpkg> .\vcpkg.exe z-changelog 2026.01.16
error: Invalid commit id: 2026.01.16
PS C:\Dev\vcpkg> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe z-changelog bogus
error: Invalid commit id: bogus
note: "C:\Program Files\Git\cmd\git.exe" -C "C:\Dev\vcpkg" -c core.autocrlf=false cat-file -e "bogus^{commit}" failed with exit code 128
fatal: Not a valid object name bogus^{commit}

PS C:\Dev\vcpkg> C:\Dev\vcpkg-tool\out\build\Win-x64-Debug-WithArtifacts\vcpkg.exe z-changelog 2026.01.16
#### Total port count: 2765
#### Total port count per triplet (tested): LINK
.
.
.
```
@BillyONeal

Copy link
Copy Markdown
Member Author

As an aside all the git operations really should get the "include console output on failure" treatment but I only had to fix one here.

@BillyONeal BillyONeal merged commit 2f940dd into microsoft:main Mar 4, 2026
7 checks passed
@BillyONeal BillyONeal deleted the accept-tags branch March 4, 2026 00:39
BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Mar 4, 2026
* Fix mismatched VCPKG_ROOT warnings when Visual Studio has vcpkg installed by @BillyONeal in microsoft/vcpkg-tool#1931
* Group feature test results by port. by @BillyONeal in microsoft/vcpkg-tool#1933
* Accept tags in portsdiff and z-changelog. by @BillyONeal in microsoft/vcpkg-tool#1935
* Bump minimatch in /vcpkg-artifacts by @dependabot[bot] in microsoft/vcpkg-tool#1934
* Allow Terrapin Retrieval Tool env vars. by @BillyONeal in microsoft/vcpkg-tool#1936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants