Add git-based detection of tags at HEAD to improve PublicRelease detection by georg-jung · Pull Request #876 · dotnet/Nerdbank.GitVersioning (original) (raw)

added 4 commits

December 15, 2022 20:37

@georg-jung

@georg-jung

@georg-jung

@georg-jung

@georg-jung

@georg-jung

@AArnott AArnott changed the titleAdd git-based detection of tags at HEAD to improve RublicRelease detection, fix #873 Add git-based detection of tags at HEAD to improve PublicRelease detection, fix #873

Dec 15, 2022

@georg-jung

Throwing was intentional to match HeadCanonicalName behaviour. Throwing fails the tests though. Maybe this is because the tests run in a cloud build environment and HeadCanonicalName isn't used there?

this.BuildingRef = cloudBuild?.BuildingTag ?? cloudBuild?.BuildingBranch ?? context.HeadCanonicalName;

This would mean that the tests would currently fail when executed locally.

@georg-jung

@georg-jung

@georg-jung

@georg-jung

Return null if no HEAD could be determined, return an empty collection if there are no matching tags.

ronaldbarendse

@georg-jung

@AArnott

@AArnott

AArnott

@georg-jung

@georg-jung

Without this fix we might have considered one level of transitive annotated tags, if a peel line is present in packed-refs. With this fix we also avoid reading the git pack of annotated tags that have peel lines and do not match the object id we are looking for.

@georg-jung

@georg-jung

@georg-jung

@georg-jung

This was referenced

Jan 16, 2026

This was referenced

Jan 23, 2026

This was referenced

Feb 3, 2026

This was referenced

Mar 10, 2026

This was referenced

Apr 13, 2026

This was referenced

Apr 21, 2026

This was referenced

May 2, 2026

craigktreasure pushed a commit to craigktreasure/Treasure.Utils that referenced this pull request

May 2, 2026

@dependabot

This was referenced

May 4, 2026

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})