-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git prompt using libgit2 (again) #55
Conversation
The reference (which can be the branch name or commit hash) is obtained by reading `.git/HEAD` because the suggested way (https://stackoverflow.com/questions/12132862) does not work (`git_repository_head` fails) if there are no commits on the branch yet.
Getting the Git tag using the following is not working.
All of these functions return a failure code even when an existing tag is checked out using Hence, I shall iterate over all tags and look for one matching the current commit. |
`git_branch_name` already does that
Test Matrix: Scenarios to Verify the Behaviour
|
Use this to detect if there is no Git repository.
Cannot link libgit2 statically
… into libgit2-git-ps1-impl
The reason these did not work is probably the tags I was testing were unannotated tags, while these functions are provided for annotated tags. |
No description provided.