HydraGit Docs
v0.3.1

File & line history · blame

Three editor-centric views: every commit that touched a file, the history of a specific selection, and an inline blame annotation on the current line.

Visual file history file.history

A per-file commit timeline — every commit that touched the file, following renames.

Entry points

  • CommandHydraGit: File History hydragit.fileHistory from the Command Palette.
  • ExplorerRight-click a file in the Explorer → HydraGit: File History (group 9_hydragit).
  • EditorRight-click in the editor body, or in the editor title context menu → File History.
  • Commit file menuRight-click a file in a commit's changed-files listHistory Up to Here — opens the file's history truncated to that revision and older.

What happens next

  1. A dedicated history view opens for the file path.
  2. Go runs file.history (with rename-following) and returns the commit list; log.file backs the in-panel "file" search.
  3. Selecting any revision shows its diff for that file; you can compare a revision against your working copy.
  4. History Up to Here threads an atRef through file.history so the timeline starts at the chosen commit — useful for "how did this file look up to this point?"

Selection / line history line.history

History for an editor selection or line range — answering "how did these lines get here?" — rendered with a custom Shiki-based diff (not VS Code's native diff editor).

Entry points

  • CommandHydraGit: History for Selection hydragit.selectionHistory — shown only when there is an editor selection.
  • EditorSelect lines → right-click → History for Selection.

What happens next

  1. Go runs line.history with { path, start, end } (git's -L line-range log).
  2. Results render as syntax-highlighted side-by-side diff cards via Shiki, with blame cards for authorship.
iWhy Shiki and not the native diff: the selection view needs inline, themed, multi-revision cards rather than a two-pane editor. See memory/selection-history-custom-diff.md.

Inline line blame blame

An end-of-line annotation on the active editor line: author, relative time and the commit summary.

Entry points

  • CommandHydraGit: Toggle Line Blame hydragit.toggleLineBlame — toggles the annotation for the session.
  • Editor menuRight-click in the editor → Toggle Line Blame.
  • Settinghydragit.lineBlame.enabled (default on) controls the startup state.

What happens next

  1. As the cursor moves, Go runs blame for the current line — buffer-aware: unsaved edits are streamed via git blame --contents - so blame is correct even with dirty changes.
  2. An inline decoration renders the author + relative date + summary; hovering shows more, with a commit avatar.
iAvatar source & hover placement decisions: memory/blame-avatar-decisions.md.