libgit2

blame

Version:

Producing a "blame" (or "annotated history") decorates individual lines in a file with the commit that introduced that particular line of changes. This can be useful to indicate when and why a particular change was made.

Objects

Opaque structure to hold blame results

Structs

Blame options structure

Structure that represents a blame hunk

Structure that represents a line in a blamed file

Macros

Current version for the git_blame_options structure

Enums

Flags for indicating option behavior for git_blame APIs

Functions

Initialize git_blame_options structure

Gets the number of lines that exist in the blame structure

Gets the number of hunks that exist in the blame structure

Gets the blame hunk at the given index

Gets the hunk that relates to the given line number in the newest commit

Gets the information about the line in the blame

Gets the number of hunks that exist in the blame structure

Gets the blame hunk at the given index

Gets the hunk that relates to the given line number in the newest commit

Get the blame for a single file in the repository

Get the blame for a single file in the repository, using the specified buffer contents as the uncommitted changes of the file (the working directory contents)

Get blame data for a file that has been modified in memory parameter is a pre-calculated blame for the in-odb history of the file. This means that once a file blame is completed (which can be expensive), updating the buffer blame is very fast.

Free memory allocated by git_blame_file or git_blame_buffer