Skip to content

Conversation

@dsymonds
Copy link
Contributor

Like git rev-parse <prefix>, this enumerates the hashes of objects
with the given prefix and adds them to the list of candidates for
resolution.

This has an exhaustive slow path, which requires enumerating all objects
and filtering each one, but also a couple of fast paths for common
cases. There's room for future work to make this faster; TODOs have been
left for that.

Fixes #135.

@mcuadros
Copy link
Member

Thanks for your contribution! I added a minor comments

Like `git rev-parse <prefix>`, this enumerates the hashes of objects
with the given prefix and adds them to the list of candidates for
resolution.

This has an exhaustive slow path, which requires enumerating all objects
and filtering each one, but also a couple of fast paths for common
cases. There's room for future work to make this faster; TODOs have been
left for that.

Fixes #135.
@dsymonds
Copy link
Contributor Author

PTAL

@mcuadros mcuadros changed the title Support partial hashes in Repository.ResolveRevision. Repository.ResolveRevision, support partial hashes Jul 16, 2020
@mcuadros mcuadros merged commit 7906922 into go-git:master Jul 16, 2020
@dsymonds dsymonds deleted the revparse-partial-hash branch July 17, 2020 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve short hashes

2 participants