20 Years of the Linux Kernel, Line by Line, on Your Own Machine
How old is the code you depend on? Not the repository: the lines that are still there today.
git blame answers that for one file. I wanted the answer for a whole repository, and I wanted to watch it change over twenty years. So I built linelapse, a free desktop tool (MIT licence) that replays a git repository’s history line by line.
It runs entirely on your machine. It reads your repository with the git already installed, keeps its index in a local cache, and sends nothing anywhere.
What it shows
Every directory is a tile, sized by its live lines and coloured by their mean age: yellow is fresh, violet is old. Tiles keep their place while you drag through history, so you see directories grow, shrink and age.
Below the map, a timeline stacks the live lines by the year they were written. On the side, a panel ranks where the lines on screen came from: for Linux, the maintainer tree named in each merge (netdev/net-next, drm/drm and so on), the merged branch, or the author of a direct commit.
A few more views:
- A source’s territory. Click a source and the map keeps colour only where that source owns the lines.
- What changes with it. Hover a tile to see which other parts of the repository its commits also touch.
- Half-life. How long it took for half of the lines ever written in the current view to disappear.
- Languages. Press
lto colour tiles by their main language.
davem/net-next: the networking tree owns drivers/net and net/, everything else fades.What twenty years of Linux look like
I used the Linux kernel as the test case: 77,605 mainline commits from v2.6.12 (2005) to November 2026, 172,609 files that ever existed, 92 million lines ever written.
A few things it shows:
- A line of Linux has a half-life of 11.3 years. In
drivers/gpuit is 17.5 years. - 48% of the commits to
fs/cephalso touchnet/ceph. The folder layout hides that link; the commit history does not. - Graphics drivers change generation in plain sight. Zoomed on
drivers/gpu,amd/grows fresh and yellow whileradeon/slowly turns violet. - Languages move too. Devicetree takes over
arch/arm*, and Rust appears inrust/.
drivers/gpu: amd/ grows fresh while radeon/ ages.arch/arm*, Rust appears in rust/.A repository is not a snapshot. It is twenty years of decisions, and most of them are still running.
The bug that changed the numbers
The first version did not follow file renames. A renamed file looked like every line had died and been born again on the same day.
On Linux, that was not a detail: 28% of all recorded “deaths” (13.4 million of 47.7 million lines) were actually renames. Once renames were followed, agreement with git blame --first-parent went from 80.5% to 99.98% of lines on a sample of 300 files, and the half-life of a Linux line went from 6.8 to 11.3 years.
That is why linelapse ships a --check mode. It compares the index against git’s own data: 0 line-count mismatches over 97,316 files at 4 commits, plus the blame comparison above. If a tool tells you how old your code is, you should be able to verify it.
Why it runs locally
Analysing a repository’s history means reading all of it: every diff, every author, every commit message. For a private repository, that is the company’s code and its people.
linelapse never needs to send any of that elsewhere. It runs one git log -p -U0 --first-parent process per CPU core on slices of history, gives every line a birth and a death commit, and stores the result in a cache on your disk (144 MB for Linux). The same idea drives VaultTools: the processing comes to the data, the data does not travel to the processing.
It is also fast because it is local. On a 14-core Mac:
- full indexing of Linux: 32 s;
- playback: 120 fps, with a frame p95 under 10 ms;
- jump to any commit: under 0.3 ms;
- a 20 second 1080p video with
--record: rendered in 6 s, offscreen, with no screen recording permission.
The window is drawn on the GPU with GPUI, the Rust UI framework behind the Zed editor: about a thousand tiles and their labels, redrawn at every step. Videos are drawn on the CPU with tiny-skia instead, which is why recording needs no window.
Known limits
Lines are dated by when they reached the main branch (often a merge), not by their author’s own commit. Copies are not followed, only renames. The cache is rebuilt from scratch when HEAD changes. The window has only been tested on macOS so far; on Linux, the build, the tests, --check and --record pass in Docker.
Try it
Prebuilt binaries for macOS and Linux are on the releases page, each with a SHA256SUMS file. You can check an archive against it without uploading it with the file checksum tool. Or build it with Cargo:
cargo install --git https://github.com/antoinehoriot/linelapse
linelapse ~/code/my-repo # a local repository
linelapse https://github.com/torvalds/linux # clones into the local cache, then opens
Then press space, and watch your code age.