Blame.file Async

Blame.file(repo, path, [options]).then(function(blame) {
  // Use blame
});

Retrieve the blame of a file

Parameters Type  
repo Repository that contains the file
path String to the file to get the blame of
[options] BlameOptions Options for the blame
Returns  
Blame the blame

Blame#buffer Async

blame.buffer(buffer, buffer_len).then(function(blame) {
  // Use blame
});
Parameters Type  
buffer String the (possibly) modified contents of the file
buffer_len Number number of valid bytes in the buffer
Returns  
Blame  

Blame#getHunkByIndex Sync

var blameHunk = blame.getHunkByIndex(index);
Parameters Type  
index Number index of the hunk to retrieve
Returns  
BlameHunk the hunk at the given index, or NULL on error

Blame#getHunkByLine Sync

var blameHunk = blame.getHunkByLine(lineno);
Parameters Type  
lineno Number the (1-based) line number to find a hunk for
Returns  
BlameHunk the hunk that contains the given line, or NULL on error

Blame#getHunkCount Sync

var result = blame.getHunkCount();
Returns  
Number  

Blame.FLAG ENUM

Flag Value
Blame.FLAG.NORMAL 0
Blame.FLAG.TRACK_COPIES_SAME_FILE 1
Blame.FLAG.TRACK_COPIES_SAME_COMMIT_MOVES 2
Blame.FLAG.TRACK_COPIES_SAME_COMMIT_COPIES 4
Blame.FLAG.TRACK_COPIES_ANY_COMMIT_COPIES 8
Blame.FLAG.FIRST_PARENT 16
Blame.FLAG.USE_MAILMAP 32