Image blobs should be printed as images instead of hexdumps

Ferry Huberts mailings at
Wed Feb 29 12:39:30 CET 2012

On 29-02-12 12:30, Lauri Niskanen wrote:
> Hi!
> Cgit currently prints a hexdump when you look at a image blob (as with
> any other binary blob). This might be a good way to show generic binary
> files, but I think images (at least png, jpg) should be shown as images.
> Example of the current behaviour:
> I suggest that instead of the hexdump you would have HTML like this:
> <img src="" />
> SVG images are not binaric so I would leave them printed as text.
> What do you think about this?

This is kind-of solved by my mime patch that's on wip.
Once Lars merges that into stable, you'll have it

 From what I understood from Lars is that files should always be shown 
within cgit (non-plain) first, because some sites want to disable the 
viewing of plain files.

Ferry Huberts

More information about the CGit mailing list