Reputation: 297155
How do I tell, given an arbitrary reference, whether it is a branch, a tag or something else?
Upvotes: 2
Views: 66
Reputation: 4452
First, you fully expand the ref:
git rev-parse --symbolic-full-name v1.9-rc2
...where v1.9-rc2
is the ref I care about. That gives me the full reframe refs/tags/v1.9-rc2
. Tags start with refs/tags
, branches start with refs/heads
.
Upvotes: 3