Blame

Repository.blame(path, flags=None, min_match_characters=None, newest_commit=None, oldest_commit=None, min_line=None, max_line=None)

blame(path, [flags, min_match_characters, newest_commit, oldest_commit, “

min_line, max_line]) -> Blame

Get the blame for a single file.

Arguments:

path
Path to the file to blame.
flags
A GIT_BLAME_* constant.
min_match_characters
The number of alphanum chars that must be detected as moving/copying within a file for it to associate those lines with the parent commit.
newest_commit
The id of the newest commit to consider.
oldest_commit
The id of the oldest commit to consider.
min_line
The first line in the file to blame.
max_line
The last line in the file to blame.

Examples:

repo.blame('foo.c', flags=GIT_BLAME_TRACK_COPIES_SAME_FILE)");

The Blame type

Blame.__iter__()
Blame.__len__()
Blame.__getitem__(n)

The BlameHunk type

Attributes:

Getters:

Constants

GIT_BLAME_NORMAL
GIT_BLAME_TRACK_COPIES_SAME_FILE
GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES
GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES
GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES