Skip to content

Conversation

@sisp
Copy link
Contributor

@sisp sisp commented Jan 11, 2024

I've fixed the download of LFS objects when the Batch API response does not contain a transfer property. In this case, the transfer property should default to "basic". This behavior conforms with the spec:

All Git LFS clients and servers SHOULD support it, and default to it if the Batch API request or response do not specify a transfer property.

For instance, GitLab's LFS server does not provide the transfer property, which causes scmrepo to fail with:

.../scmrepo/git/lfs/client.py", line 201, in _download
    raise LFSError("Unsupported LFS transfer type")

After this fix, downloading LFS objects from GitLab works.

@skshetry skshetry requested a review from pmrowla January 11, 2024 13:56
@pmrowla pmrowla self-assigned this Jan 11, 2024
@pmrowla pmrowla added the lfs Related to Git-LFS support label Jan 11, 2024
@pmrowla pmrowla merged commit 70bdaef into treeverse:main Jan 11, 2024
@pmrowla
Copy link
Contributor

pmrowla commented Jan 11, 2024

Thanks for catching this @sisp!

scmrepo==2.0.3 is now released with this fix

@sisp sisp deleted the fix/lfs-transfer-default branch January 11, 2024 14:58
@sisp
Copy link
Contributor Author

sisp commented Jan 11, 2024

Thanks for the quick review, merge and release, @pmrowla! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lfs Related to Git-LFS support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants