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
Which states --filter=tree:0 can be used to still get the git history, which I think is enough information to calculate the git height while speeding up git checkout by not downloading unnecessary data.
Unhandled exception: System.InvalidOperationException: Unable to get version from commit: 0f5510eaf09d88f7b102af37186a716093087fc4
---> Nerdbank.GitVersioning.GitException: An tree object with SHA 3f4ff30cf90fe50997c09702a57d01ebf5c9d53f could not be found.
at Nerdbank.GitVersioning.ManagedGit.GitRepository.GetObjectBySha(GitObjectId sha, String objectType)
at Nerdbank.GitVersioning.ManagedGit.GitRepository.GetTreeEntry(GitObjectId treeId, ReadOnlySpan`1 nodeName)
at Nerdbank.GitVersioning.Managed.ManagedVersionFile.GetVersion(GitCommit commit, String repoRelativeProjectDirectory, Dictionary`2 blobVersionCache, String& actualDirectory)
at Nerdbank.GitVersioning.Managed.GitExtensions.GitWalkTracker.GetVersion(GitCommit commit)
The text was updated successfully, but these errors were encountered:
I've never tested that scenario. I don't know how git tree objects are supposed to exist in sparse checkout scenarios so I suppose it makes sense that that operation would fail. Whether there's a workaround or not... there probably is somewhere. But adding support for this isn't something that I'm going to personally have time to do. If you're interested in sending a PR with a test and the new code to support it, I'd welcome it though.
Hello
I was reading this post:
https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/
Which states
--filter=tree:0
can be used to still get the git history, which I think is enough information to calculate the git height while speeding up git checkout by not downloading unnecessary data.But when I enabled it in github actions:
nbgv get-version
throws an exception:The text was updated successfully, but these errors were encountered: