Page MenuHomePhabricator

Images in Diffusion don't register as such in BrowseTable
Open, Needs TriagePublic



The icons should be different for images, it's just getting the standard 'text' icon.

Event Timeline

In SVN, we can use a different icon because we have prebuilt cache of file types (and must have this cache for other reasons, and can build this cache efficiently, and SVN distinguishes between binary and text files).

In Git, we don't have such a cache and can't build one efficiently. We use git ls-tree to list the files, but it can't tell us about types. GitHub also shows these files with "text file" icons:

Git itself doesn't formally distinguish between binary and non-binary files in repository metadata, although it has a runtime check that is used in some cases (which tests for "\0" bytes near the beginning of the file).

We could add some kind of icon map, where ".jpg, .png, .gif", etc., files get an image icon. This would sometimes be wrong (non-image files get image icons based purely on their names; image files get text icons if they don't have the proper names) and the wrong cases might be a bit misleading, but maybe it's right often enough to be worthwhile.

(There is also a different type of cache from <object hash -> metadata> we could build in Git, but that's kind of a lot of work.)