go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
43.04k stars 5.32k forks source link

Add icon for LFS files in file explorer #30209

Open OwOchle opened 3 months ago

OwOchle commented 3 months ago

Feature Description

It would be nice if gitea had a way to quickly find out which files are stored on lfs. It's quite a small change but it could be very handy.

Screenshots

image Hugging face example

lunny commented 3 months ago

To implement this, we need to store the LFS object's tree path in database.

OwOchle commented 3 months ago

Well, I don't know how it is implemented in the backend but lfs object are marked as so when viewing them : image

lunny commented 3 months ago

For a special object, we can read the pointer. But for a file list(some directories have thousands files), reading the pointer is low performance.

OwOchle commented 3 months ago

Well, if possible it would be nice, but it's not that big of a deal, just handy. You may close the issue if you think it's too complex and/or useless to spend time on.

lunny commented 3 months ago

Well, if possible it would be nice, but it's not that big of a deal, just handy. You may close the issue if you think it's too complex and/or useless to spend time on.

No, I think this is useful. Let's keep it open until someone would like to implement it.