Skip to content

Batch download API spec clarification #3746

@slonopotamus

Description

@slonopotamus

Batch download API states that client must send "size - Integer byte size of the LFS object. Must be at least zero". However, it isn't clear how server is supposed to handle it.

lfs-testserver (and Gitea, because they use almost the same code) ignores the value and responds with actual object size. git-as-svn checks that actual object size is equal to received size, but only if size was nonnegative (i.e. git-as-svn accepts negative size). GitLab, the most evil one, accepts any value and responds with it even if actual object has different size.

I would be happy if spec was changed in such a way that makes GitLab behavior noncompliant. I have cases when client doesn't know object size in advance. It can use individual file download API (you only need to know file oid), but cannot adequately use batch API against GitLab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions