You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After git decided to pack my repo with several worktrees and a bunch of local branches, my builds started failing with following error:
D:\Corextroot\microsoft.build.tasks.git\8.0.0\build\Microsoft.Build.Tasks.Git.targets(25,5): Repository has no commit. [D:\Pl3\Test\UnitTests\Common\Tools.UnitTests.Common\Tools.UT.Common.csproj]
D:\Pl3 is a worktree of D:\Platform.
D:\Platform\.git\worktrees\Pl3\refs is empty.
D:\Platform\.git\refs\heads doesn't have a ref of a branch that's checked out in D:\Pl3 either
The only reference to the commit ID of a branch specified in D:\Platform\.git\worktrees\Pl3\HEAD is in D:\Platform\.git\packed-refs
Sourcelink task is unable to handle this situation.
I have worked to add a unit test that covers my scenario: #1289
The text was updated successfully, but these errors were encountered:
The issue went away after I created the very next commit, which created D:\Platform.git\refs\heads\user\vikukush\mstestv3 file, so the commit ID was no longer inside packed-refs.
So the bug can be easily worked around, but this of course still needs to be fixed.
After git decided to pack my repo with several worktrees and a bunch of local branches, my builds started failing with following error:
D:\Corextroot\microsoft.build.tasks.git\8.0.0\build\Microsoft.Build.Tasks.Git.targets(25,5): Repository has no commit. [D:\Pl3\Test\UnitTests\Common\Tools.UnitTests.Common\Tools.UT.Common.csproj]
Sourcelink task is unable to handle this situation.
I have worked to add a unit test that covers my scenario: #1289
The text was updated successfully, but these errors were encountered: