-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Use LFS object size instead of blob size when viewing a LFS file #35679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
shows the main LFS filesize instead of the pointer filesize when viewing a file
Thank you for the PR, but I think we shouldn't use a quick patch for this requirement. All existing code assumes that "fileSize is the size of blob in the commit", if you changed this assumption, it would cause bugs. The first rule: do not change widely used definition in existing code unless you are pretty sure it is safe. Update: the change is right, need to revert to the old behavior |
I understand your point — it makes sense not to change a widely used definition without ensuring it’s safe. |
Hmm, you are right. Related to Add support for 3D/CAD file formats preview (#34794) In old code, fileSize does sometimes mean blob size, sometimes mean LFS size. So maybe it's safe to revert the old behavior. Will take a look again. |
Made a small change in bd02218 , use a new name blobOrLfsSize, then it seems clearer now 😄 |
And added more tests in 7ddf3b2 , the behavior should be stable now. |
…gitea#35679) shows the main LFS filesize instead of the pointer filesize when viewing a file --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* giteaofficial/main: Avoid emoji mismatch and allow to only enable chosen emojis (go-gitea#35692) feat(diff): Enable commenting on expanded lines in PR diffs (go-gitea#35662) Fix various bugs (go-gitea#35684) Fix workflow run event status while rerunning a failed job (go-gitea#35689) Use gitrepo.Repository instead of wikipath (go-gitea#35398) [skip ci] Updated translations via Crowdin Bump `actions/labeler` to v6 (go-gitea#35681) Use LFS object size instead of blob size when viewing a LFS file (go-gitea#35679)
shows the main LFS filesize instead of the pointer filesize when viewing a file