git-iblame 0.7.0

Interactive enhanced `git blame` command line tool.
Documentation

CI-badge crate-badge docs-badge

git-iblame

An interactive enhanced git blame command line tool.

The git-iblame allows you to find changes to the lines of your interests interactively, not only the last change as git blame can do, but also all the past changes, up to the initial commit.

Features:

  • The interactive "current line" specifies the line of your interests.
  • Easy and instant traversals to older or newer trees of the line.
  • Inspect the commit that modified the line.
  • Deleted lines are also shown for inspections.

The git-iblame is built for speed. Computing all the history of a file is an expensive task, especially when the repository is large.

To make the traversals of the large history responsive, the git-iblame has its own file history engine. This engine is built on top of the fundamental git operations provided by the git2/libgit2, without using the logic in the git blame.

The engine runs in background to make git-iblame responsive. Old annotations which takes time to read from the disk come up incrementally while you are browsing.

When browsing older or newer trees, the git-iblame's engine can re-compute the history for the trees instantly from its own data structure in memory, unlike the git blame which reads the data from the disk each time it is ran.

Install

Prerequisites

From crates.io

cargo install git-iblame

From github

cargo install --git https://github.com/kojiishi/git-iblame

From local checkout

After changing the current directory to the checkout directory:

cargo install --path .

Usages

To start an interactive git blame session, specify the path of the file in a git repository.

git-iblame <path-to-file>

The output is similar to git blame, with the current line highlighted. You can move the current line, or traverse the git history of the current line.

Please see the help by pressing the h key for the full commands and their key bindings. Major commands are:

  • h: Show the help.
  • q: Quit the program.
  • s: Show the commit at the current line.
  • d: Show the diff of the current file of the commit at the current line.
  • c: Copy the hash of the current line commit to the clipboard.
  • (Right): Traverse to the parent commit of the commit at the current line.
  • (Left): Undo the last traversal; i.e., traverse back to the last newer tree.

Change History

Please see release notes.