Skip to content

feat(api): add lfs metadata#8

Merged
Narsil merged 9 commits into
mainfrom
feat/add_lfs_meta
Aug 2, 2023
Merged

feat(api): add lfs metadata#8
Narsil merged 9 commits into
mainfrom
feat/add_lfs_meta

Conversation

@McPatate

Copy link
Copy Markdown
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

Narsil commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

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.

@Narsil Narsil left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread src/api/sync.rs Outdated
Comment thread src/api/sync.rs Outdated
Comment thread src/api/sync.rs Outdated

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

Copy link
Copy Markdown
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?) ?

@McPatate McPatate Aug 1, 2023

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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>

Comment thread src/api/tokio.rs Outdated

@Narsil Narsil left a comment

Copy link
Copy Markdown
Contributor

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.

2 participants