GitInfo icon indicating copy to clipboard operation
GitInfo copied to clipboard

Can not find all git info when on branch with '.' in the name

Open henkmartijn opened this issue 2 years ago • 1 comments

Describe the Bug

Can not find all git info during build when on branch with '.' in the name for instance ThisAssembly.Git.BaseTag will be empty

Steps to Reproduce

Use GitInfo in a project have a tag on a reachable branch Create and checkout a branch with a '.' in the name for instance: 'dotnet8.0' build the project.

Warnings: 4>xxx.nuget\packages\gitinfo\3.3.3\build\GitInfo.targets(713,5): warning MSB3073: The command "..." exited with code 128. 4>Cxxx.nuget\packages\gitinfo\3.3.3\build\GitInfo.targets(726,5): warning GI005: Could not retrieve first commit where branch dotnet8.0 forked from main. Defaulting to zero commits.

When running the program ThisAssembly.Git.BaseTag will be empty

Expected Behavior

  • no warnings
  • the correct tag in BaseTag

Version Info

Version 3.3.3, but also with older versions

henkmartijn avatar Jan 03 '24 19:01 henkmartijn

Happy to take a PR on this one 🙏

kzu avatar Feb 04 '24 00:02 kzu

same with branches using /

example branch: features/#6924-refactor ThisAssembly.Git.Branch will return features

AngryNui avatar Apr 10 '24 14:04 AngryNui

There doesn't seem to be much interest in this, and no PR has been submitted, so closing for now.

kzu avatar May 08 '24 16:05 kzu