Skip to content

Conversation

@McPatate
Copy link
Member

Full lfs object looks like this :

"lfs": {
    "sha256": "5b1da7ebe3bdcc58c91eb9916f7d881791ac2659307f0c383c325361382f2f42",
    "size": 2239866697,
    "pointerSize": 135
}

Needed for the repo scanner

@McPatate McPatate requested a review from Narsil July 31, 2023 14:46
@Narsil
Copy link
Contributor

Narsil commented Jul 31, 2023

Can we add a test for it ? (Also so I can have a look at what models return that could be interesting in other places to get file sizes without Range:0-0.

Copy link
Contributor

@Narsil Narsil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite nice.

I propose a different (simpler imho) internals.

Otherwise looks good. Not sure how cargo fmt didn't pick up those before.

src/api/sync.rs Outdated

/// serde_json error
#[error("Serde json error: {0}")]
SerdeJson(#[from] serde_json::Error),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How were we getting away without it before, is it the map(Box?) ?

Copy link
Member Author

@McPatate McPatate Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Response::into_json returns an io::Result<T> while serde_json::from_value returns a Result<T, serde_json::Error>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And reqwest::Response::json returns a Result<T, reqwest::Error>

Copy link
Contributor

@Narsil Narsil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Narsil Narsil merged commit a13a818 into main Aug 2, 2023
@McPatate McPatate deleted the feat/add_lfs_meta branch August 2, 2023 15:12
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.

3 participants