<commit-ish> parsing does not recognize @ as HEAD
See original GitHub issueWith nbgv 3.4.244+c60a07221c, nbgv get-version @
claims “rev-parse produced no commit for @”, even though git rev-parse @
treats @
as equivalent to HEAD
as documented in git-rev-parse(1).
Microsoft Windows [Version 10.0.19044.1415]
(c) Microsoft Corporation. All rights reserved.
C:\Projects>mkdir commit-ish-parsing
C:\Projects>cd commit-ish-parsing
C:\Projects\commit-ish-parsing>git init
Initialized empty Git repository in C:/Projects/commit-ish-parsing/.git/
C:\Projects\commit-ish-parsing>nbgv install
C:\Projects\commit-ish-parsing>git status
starting fsmonitor-daemon in 'C:/Projects/commit-ish-parsing'
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: Directory.Build.props
new file: version.json
C:\Projects\commit-ish-parsing>git commit -m "nbgv install"
[master (root-commit) 84f4f71] nbgv install
2 files changed, 22 insertions(+)
create mode 100644 Directory.Build.props
create mode 100644 version.json
C:\Projects\commit-ish-parsing>copy nul dummy
1 file(s) copied.
C:\Projects\commit-ish-parsing>git add dummy
C:\Projects\commit-ish-parsing>git commit -m dummy
[master c4fd226] dummy
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 dummy
C:\Projects\commit-ish-parsing>nbgv get-version
Version: 1.0.2.64964
AssemblyVersion: 1.0.0.0
AssemblyInformationalVersion: 1.0.2-beta+c4fd226c01
NuGetPackageVersion: 1.0.2-beta
NpmPackageVersion: 1.0.2-beta
C:\Projects\commit-ish-parsing>nbgv get-version @
rev-parse produced no commit for @
C:\Projects\commit-ish-parsing>nbgv get-version HEAD
Version: 1.0.2.64964
AssemblyVersion: 1.0.0.0
AssemblyInformationalVersion: 1.0.2-beta+c4fd226c01
NuGetPackageVersion: 1.0.2-beta
NpmPackageVersion: 1.0.2-beta
C:\Projects\commit-ish-parsing>git rev-parse @
c4fd226c0169d5f05e10030513c60c376ed565ae
C:\Projects\commit-ish-parsing>nbgv --version
3.4.244+c60a07221c
C:\Projects\commit-ish-parsing>
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
fatal: could not parse HEAD Error When Committing
Basically, the symbolic reference with the name HEAD is corrupted somehow. You (or software you ran) must have gone poking around the .git...
Read more >Git - git-rev-parse Documentation
This is similar to --symbolic, but it omits input that are not refs (i.e. branch or tag names; or more explicitly disambiguating "heads/master"...
Read more >Commits are snapshots, not diffs
We will use the git rev-parse <ref> command to discover these OIDs. ... If the contents don't match the current OID at HEAD:README.md ......
Read more >git-rev-parse
Options for Output --default <arg> If there is no parameter given by the user, use <arg> instead. --prefix <arg> Behave as if git...
Read more >Commits
There was an error parsing the signature. invalid, The signature could not be cryptographically verified using the key whose key-id was found in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I guess this is somewhat of a duplicate of https://github.com/dotnet/Nerdbank.GitVersioning/issues/572.
I have opened a corresponding issue for ManagedGitLib: https://github.com/GlebChili/ManagedGitLib/issues/6
I will try to implement a full support for the revision specification syntax in question, but I’m not sure how fast can I do it.