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
I have an annotated tag "1.49.0" and the tag object points to a commit. Now when I run nbgv get-version 1.49.0 using nbgv 3.4.255+06fb9182bf, it fails:
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Nerdbank.GitVersioning.GitException: An object of type commit could not be located at offset 17101936.
at Nerdbank.GitVersioning.ManagedGit.GitPackReader.GetObject(GitPack pack, Stream stream, Int64 offset, String objectType, GitPackObjectType packObjectType) in D:\a\1\s\src\NerdBank.GitVersioning\ManagedGit\GitPackReader.cs:line 70
at Nerdbank.GitVersioning.ManagedGit.GitPack.GetObject(Int64 offset, String objectType) in D:\a\1\s\src\NerdBank.GitVersioning\ManagedGit\GitPack.cs:line 212
at Nerdbank.GitVersioning.ManagedGit.GitRepository.TryGetObjectBySha(GitObjectId sha, String objectType, Stream& value) in D:\a\1\s\src\NerdBank.GitVersioning\ManagedGit\GitRepository.cs:line 534
at Nerdbank.GitVersioning.ManagedGit.GitRepository.GetObjectBySha(GitObjectId sha, String objectType) in D:\a\1\s\src\NerdBank.GitVersioning\ManagedGit\GitRepository.cs:line 499
at Nerdbank.GitVersioning.ManagedGit.GitRepository.GetCommit(GitObjectId sha, Boolean readAuthor) in D:\a\1\s\src\NerdBank.GitVersioning\ManagedGit\GitRepository.cs:line 264
at Nerdbank.GitVersioning.Managed.ManagedGitContext.TrySelectCommit(String committish) in D:\a\1\s\src\NerdBank.GitVersioning\Managed\ManagedGitContext.cs:line 66
at Nerdbank.GitVersioning.Tool.Program.OnGetVersionCommand(String project, IReadOnlyList`1 metadata, String format, String variable, String commitish) in D:\a\1\s\src\nbgv\Program.cs:line 385
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__21_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass25_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__22_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__11_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
The text was updated successfully, but these errors were encountered:
nbgv get-version 1.49.0^{} and nbgv get-version 1.49.0^{commit} don't work either ("rev-parse produced no commit"), but those might be covered by #572.
Ya, I'm not at all surprised that the ^{} syntax doesn't work any more. As for the bug with not handling annotated tags, I'm surprised we even try to read them. But we should get this fixed.
I have an annotated tag "1.49.0" and the tag object points to a commit. Now when I run
nbgv get-version 1.49.0
using nbgv 3.4.255+06fb9182bf, it fails:The text was updated successfully, but these errors were encountered: