Skip to content
quarry Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 356c70987e8a834430324ca312139aef235eab0088e2fbf98bff4fb49e6d412a
Ticket: 32709698c64db4c07b07eef89b0c70250fa21118
Language breakdown bar for a repository
User & Date: dmestas on 2026-08-18 19:22:38
Changes

  1. Untracked field cmimetype: "text/x-markdown"
  2. comment changed to:
    Forgejo shows a colour bar of the languages in a repository. The data source is the tip tree, which quarry can already list.
    
    The cost is not the classification — extension-to-language is a lookup table — but that byte counts per file require reading the tree, and 0001 §2 means every file goes through a `zit cat` subprocess. For sqlite that is 2,219 spawns.
    
    Two things make it affordable:
    
    - `zit ls` already reports sizes, so the bar can be built from extension plus size WITHOUT reading any file contents. That is one subprocess, not thousands. It misclassifies files whose extension lies, which for a language bar is an acceptable error.
    - The result is a pure function of a resolved check-in, exactly like an archive, so it caches under the same rule and never needs invalidating.
    
    Recommend the `zit ls` route: one call, cacheable forever per check-in, and no new dependency. Show it as the strip forgejo uses but with the legend inline rather than on hover, so it is readable on touch.
    
  3. severity changed to: "Minor"
  4. status changed to: "Open"
  5. title changed to: "Language breakdown bar for a repository"
  6. type changed to: "Feature_Request"