Read the Hub's field names for LFS blob metadata - #211
Merged
Merged
Conversation
McPatate
approved these changes
Sep 18, 2026
assafvayner
added this pull request to stack #218
September 18, 2026 21:15
`BlobLfsInfo` declared `sha256` and `pointer_size`, but `tree` and `paths-info` return `oid` and `pointerSize`. With no rename or alias on the struct, two of its three fields silently deserialized to `None` for every LFS-backed file, so callers of `get_paths_info` or `list_tree(expand = true)` never saw the LFS object id or pointer size.
assafvayner
force-pushed
the
assafvayner/blob-lfs-info-field-names
branch
from
September 18, 2026 21:32
d4e0915 to
ee6a6b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BlobLfsInfodeclaressha256andpointer_size, but the Hub returnsoidandpointerSizeon bothtreeandpaths-info. With norename_allor alias on the struct, two of its three fields silently deserialized toNonefor every LFS-backed file — so anyone readingget_paths_infoorlist_tree(expand = true)never saw the LFS object id or the pointer size.Confirmed against the live Hub;
paths-infofor a Xet file returns"lfs": {"oid": "...", "size": ..., "pointerSize": 134}.#[serde(rename_all = "camelCase")]fixespointer_size#[serde(alias = "oid")]fixessha256while keeping the descriptive public field nameleft: None, right: Some("realsha")Nothing else in the workspace reads these fields and no test pinned the old shape. Found while fixing
get_file_metadatafor Xet files, which needslfs.sha256to match what the HEAD path reports.