Skip to content

Get latest commit hash from remote URL #930

Answered by Byron
jakewilliami asked this question in Q&A
Discussion options

You must be logged in to vote

The real answer is that even though one can query remote references, one can't do so without a 'real' Repository instance.


Thanks so much for pointing this out! Clearly that's a hole in the API as currently there is no way to get a Remote without a Repository, nor is it possible to get an in-memory repository. Right now the only workaround would be to have a physical repo on disk, but that's probably not really a workaround anyway.

It seems that the only reasonable thing to do with a Remote without Repository is to list remote references, and that could be put into its own utility function. After all, gitoxide's plumbing crates are made to operate with only the bare minimum of informatio…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jakewilliami
Comment options

@Byron
Comment options

@jakewilliami
Comment options

@Byron
Comment options

Answer selected by Byron
@jakewilliami
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants