draft: fix: handle varying compression ratios in pack file decoding#16
Draft
ketsapiwiq wants to merge 1 commit intoGitJournal:masterfrom
Draft
draft: fix: handle varying compression ratios in pack file decoding#16ketsapiwiq wants to merge 1 commit intoGitJournal:masterfrom
ketsapiwiq wants to merge 1 commit intoGitJournal:masterfrom
Conversation
The previous implementation assumed that reading objSize compressed bytes would always yield objSize decompressed bytes. This fails in large repos where compression ratios vary significantly. Changed to iteratively read chunks until enough decompressed data is available, with proper error handling instead of assertion failure. Fixes assertion error: 'outputSink.builder.length >= objSize': is not true
Contributor
|
Thanks for this. I'll test it out against my repos, and read a bit more and then probably merge it. The long term plan is to to migrate to gitoxide and archive this project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! I needed to add that fix to be able to clone my large repo with a lot of history in GitJournal.
However, as I don't know Dart or git that extensively, it's an LLM/agent/slop PR (GLM 5) (except this text is written by me).
It fixed my problem but code is probably not in a state you want, however maybe it will be an inspiration so I'm opening this PR as draft. Feel free to close it of course.
Sorry I can't give the repo that I'm now able to clone because, well, it's personal notes :p
Thanks a lot for the beautiful software.