All posts

Docs1 min read

File history, blame, and compare

Follow one file through renames, attribute every line, and diff any two refs — all read-only through libgit2.

Three related views share one surface and one breadcrumb: file history, blame, and compare.

File history

Open any file’s history for revisions newest-first. Selecting one shows its diff plus:

  • The short SHA, with Copy SHA
  • Subject, author, and relative age
  • Open this commit — jump the graph to it
  • Blame at this revision — blame as of that commit, not as of now

When a revision renamed the file, the inspector names the previous path and history continues through the rename. Deletions are flagged as deletions, not ordinary changes.

The backend caps how far it walks. A trailing + on the count (200+) means “at least 200, and the walk stopped,” not “exactly 200.”

Blame and compare

Blame groups consecutive lines from the same commit into one gutter entry, coloured from the same lane palette as the graph. Ages are compact (2d, 3wk, 6mo). Binary files are refused rather than rendered as noise; very large files are truncated with a banner.

Compare diffs any two refs: Upstream, Branch, Commit, or Working. A range bar names both ends (with swap), plus a filterable file list and the same diff renderer as everywhere else. Huge ranges cap the file list so the view doesn’t stall — use the path filter to narrow it.

File history and blame open from the changes panel, a commit’s file list, or the in-repository file browser. Compare opens from the graph.

Good to know

All three views read through libgit2, not by shelling out. They’re fast enough to use casually, and they structurally can’t modify the repository.

Full walkthrough: File history, blame, and compare.

Installers: Download GitLane.