dev.knotless.getBlame

Who last changed each line of a text file at a revision, as git blame finds it: the file's text, the ranges its highlighting paints, its lines in runs from the same commit, and each of those commits once. A binary file, or one over 256 KiB, is refused. No authentication needed; asked as an account, with a service token or the pages' session cookie, a private repository it is a member of is read too, and the answer is that account's alone.

Details · query
Kindquery
Authorityknotless.dev
Indexed

Query

query · GET

Parameters

query string

path

string

A file in the tree, from its root.

  • maxLength: 4096

ref

string

A branch, a tag or a commit, which may run on into the path, as dev.knotless.getFile takes it; the default branch if absent.

  • maxLength: 1024

repo

requiredstring · at-uri

The repository's dev.knotless.repo record, as dev.knotless.getFile takes it.

Output

application/json

commits

requiredarray

Each commit a run names, once.

itemsref

hunks

requiredarray

Its lines in runs, each last changed by one commit, from the first line on.

itemsref
Reference

lines

requiredinteger

How many lines the text has.

  • minimum: 1

path

requiredstring

The file, from the root.

ranges

requiredstring

The ranges its highlighting paints, encoded as the pages read them, as dev.knotless.getFile has them.

ref

requiredstring

The ref or commit shown, as `ref` named it, less any path.

text

requiredstring

The file's text.

Errors

NotFound

No such repository, revision or file.

InvalidRequest

The file is binary, or too large to blame.

#hunk

object

A run of lines one commit last changed.

Properties

count

requiredinteger

How many lines it runs for.

  • minimum: 1
Reference

sha

requiredstring

The commit, in hex: one of `commits`.

start

requiredinteger

The run's first line, counted from 1.

  • minimum: 1

#previous

object

Where blame goes on before the run's commit: its parent, and the file's path there. Absent where the commit made the file.

Properties

path

requiredstring

The file's path in that parent, from the root.

sha

requiredstring

The commit's parent, in hex.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.