git-lfs gitlab interoperability fix
git-lfs: Fix interoperability with gitlab's implementation of the git-lfs protocol, which requests Content-Encoding chunked. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
dee462f536
commit
f3326b8b5a
8 changed files with 105 additions and 11 deletions
|
@ -457,7 +457,11 @@ store rs h = fileStorer $ \k src p -> getLFSEndpoint LFS.RequestUpload h >>= \ca
|
|||
(req, sha256, size) <- mkUploadRequest rs k src
|
||||
sendTransferRequest req endpoint >>= \case
|
||||
Right resp -> do
|
||||
body <- liftIO $ httpBodyStorer src p
|
||||
let body (LFS.ServerSupportsChunks ssc) =
|
||||
if ssc
|
||||
then httpBodyStorerChunked src p
|
||||
else RequestBodyIO $
|
||||
httpBodyStorer src p
|
||||
forM_ (LFS.objects resp) $
|
||||
send body sha256 size
|
||||
Left err -> giveup err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue