-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Known implementations #101
Comments
I want to use this for s3 storage but not sure how to go about this. |
@slonopotamus What is the "object hash" I need to pass to the client in order to download a blob? Is it the hash of the content? hash of the commit? |
It's the hash of LFS object from pointer file. So if you have, for example, this file:
Then hash is You can use So, the whole procedure is something like this (plus various error handling): val OID_PREFIX = "sha256:"
val bytes = ...; // Read pointer file from somewhere
val lfsClient = ...; // Construct client
val pointer = Pointer.parsePointer(bytes, 0, length)!!
val oid = pointer[Constants.OID]
val size = pointer[Constants.SIZE].toLong()
val hash: String = oid.substring(OID_PREFIX.length)
val dataStream = lfsClient.openObject(hash) |
Is there a section with known implementations for this? (
*Manager
classes?)The text was updated successfully, but these errors were encountered: