You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
how to get reference information from repository.head #203
Since Repository.revparse_single('HEAD') returns as well a commit object we could change Repository.head to return the reference instead. This is what the libgit2 function does as well. @jdavid or @esc what do you think?
Activity
cholin commentedon Apr 8, 2013
Since
Repository.revparse_single('HEAD')returns as well a commit object we could changeRepository.headto return the reference instead. This is what the libgit2 function does as well. @jdavid or @esc what do you think?esc commentedon Apr 8, 2013
Is there any other way to obtain the reference?
jdavid commentedon Apr 8, 2013
I like the proposition of @cholin, but since it changes the API it should go to the next branch, and only land in master after a release.
@alexband @esc To get the resolved head reference you can type:
alexband commentedon Apr 8, 2013
@jdavid did you mean
head = repo.lookup_reference('HEAD').resolve()I'll give try. Thank you all. And I think @cholin 's proposal sounds good
Now Repository.head returns a reference (#203)
alexband commentedon Apr 17, 2013
@jdavid bravo! mucho gracias
Release 0.18.1