Options
git blame -L-style range specs. Each entry is one -L argument: numeric
ranges ("10,20"), regex anchors ("/getUser/,/^}/"), relative offsets
("10,+5"), half-open ranges ("10,", ",20"), a single line ("10"), or
function names (":funcname"). Up to 16 specs per request. Omit to blame
the whole file. (TypeScript: ranges, Python: ranges, Go: Ranges.)Response
The ref the blame ran against. When the request omitted
ref, this is the repository’s default
branch.lineNumber— 1-based line number in the file atrefcommitSha— commit that last touched the lineoriginalLineNumber— line number in the originating commit (differs after edits)originalPath— path in the originating commit (differs after renames whendetectMovesis on)previousCommitSha— parent commit that touched the line; omitted for the initial commitauthorName,authorEmailauthorTime(parsedDatein TypeScript,datetimein Python,time.Timein Go)rawAuthorTime— RFC 3339 string as returned by the servercommitterName,committerEmail,committerTime,rawCommitterTimesummary— first line of the commit message
Notes
- Commit metadata is duplicated per line in the SDK result; if you need a deduped commit map, group
by
commitShaclient-side. - Each
rangesentry is onegit blame -Largument. Supported forms: a single line"10", a numeric range"10,20", an offset"10,+5"/"10,-5", a regex"/getUser/", a regex pair"/start/,/end/", regex + offset"/start/,+30", half-open ranges"10,"and",20", and":funcname"for function-body targeting. Line numbers are 1-based and inclusive; ranges that resolve to lines outside the file return a 400, not a silent clamp. Up to 16 specs per request, each capped at 256 characters (regex content capped at 200). - Annotated tags are peeled to the underlying commit, so
commitShaalways equals the dereferenced commit (git rev-parse <ref>^{}). - Symlinks blame as a single line of the link-target text. Binary files (including ones that cross git’s 8 KiB heuristic via embedded NUL bytes) are blamed as text.
pathmay not contain NUL bytes.