ek9_git_blame
Answers first: lineCount and the range, then one record per line (line, sha, author, email, date, subject, text); verbosity:'summary' collapses them to same-commit runs.
When to use it
'Who wrote this line, in which commit?' - one call with path; startLine/endLine narrow the slice, ref blames an older revision. The regression-hunting primitive.
When not to use it
- the commits that touched the file - use
ek9_git_log. - the content of one commit - use
ek9_git_diffwith ref:'<sha>'. - a file's current content with no authorship - use
ek9_read_file.
Details
Headline first: status, summary, path, ref (HEAD unless given), lineCount, commitCount (distinct shas), rangeStart/rangeEnd; then lines[]. verbosity:'summary' collapses consecutive same-commit lines into runs[] {fromLine, toLine, sha, author, date, subject} without the text. Refusals: a file git does not track (file-not-tracked), a binary file, an unknown ref, an inverted range.
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
endLine | integer | 1-based last line of the slice, inclusive (with startLine). | |
path | string | yes | Workspace-relative path of a tracked file. |
range | object | IDE alias: the same slice as one object {startLine, endLine}. | |
ref | string | Commit, tag or branch to blame at. Default HEAD. | |
startLine | integer | 1-based first line of the slice to blame (with endLine). Default: the whole file. |
It also takes the arguments every tool takes.