Open heaths opened 3 years ago
This is an expected regression from #521 (CC: @qmfrederik). We only support (partial) commit IDs and refs at this point unless you explicitly. You should be able to workaround it by switching to the libgit2 engine as described in our release notes.
Supporting all the various committish forms in the all-managed engine would be a large undertaking I suspect. I am curious why you were doing this and how often you anticipate hitting this.
Was trying various scenarios using the latest nbgv global tool release and what I had in my branch for #567. For a while, I thought somehow my code changes broke this (something to do with the parsing), but after stashing and switching back to master, found it was broken before (same as with the other bug).
If it's not supported, I understand. But might want to catch the issue and gracefully error or throw a new exception with a more friendly error. The error message itself isn't obvious unless you look further down the stack, and not everyone using nbgv may find that so easy.
Looking from the docs, there are two types of Ancestry References which are supported:
^
(caret) for the parent of a commit, or ^n
for the nth parent of a commit (if that commit has multiple parent)~
(tilde), optionally followed by an integer. So you can have HEAD
, HEAD^
, HEAD^2
, HEAD~
or HEAD~n
. These can be combined, so you can have something like HEAD~3^2
.
nbgv version 3.3.37+0989e8fe0c could parse commitishes like HEAD~2 but the latest version build from master cannot. It yields an exception: