Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Removed error thrown by symbolic-ref and describe #307

Merged
merged 1 commit into from
Oct 10, 2016

Conversation

JanDeDobbeleer
Copy link
Contributor

@JanDeDobbeleer JanDeDobbeleer commented Oct 8, 2016

git describe can be replaced by tag --points-at . Other than symbolic-ref, describe does not have a --quiet switch, thus always adds to $error in case of a detached head with no tag pointing to that commit. Using tag --point-at HEAD will return a tag if one is found but not throw an error when there is none.

It is a bug which was reported through a user of oh-my-posh.

git describe can be replaced by tag --points-at <commitish>. Other than symbolic-ref, describe does not have a --quiet switch, thus always adds to $error in case of a detached head with no tag pointing to that commit. Using tag --point-at HEAD will return a tag if one is found but not throw an error when there is none.
@dahlbyk dahlbyk merged commit fba883f into dahlbyk:master Oct 10, 2016
@dahlbyk
Copy link
Owner

dahlbyk commented Oct 10, 2016

💯 thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants