1 | import { Repository } from './repository';
|
2 | import { BlameOptions } from './blame-options';
|
3 | import { BlameHunk } from './blame-hunk';
|
4 |
|
5 | export namespace Blame {
|
6 | const enum FLAG {
|
7 | NORMAL = 0,
|
8 | TRACK_COPIES_SAME_FILE = 1,
|
9 | TRACK_COPIES_SAME_COMMIT_MOVES = 2,
|
10 | TRACK_COPIES_SAME_COMMIT_COPIES = 4,
|
11 | TRACK_COPIES_ANY_COMMIT_COPIES = 8,
|
12 | FIRST_PARENT = 16,
|
13 | }
|
14 | }
|
15 |
|
16 | export class Blame {
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | static file(repo: Repository, path: string, options?: BlameOptions): Promise<Blame>;
|
25 | |
26 |
|
27 |
|
28 |
|
29 | static initOptions(opts: BlameOptions, version: number): number;
|
30 |
|
31 | buffer(buffer: string, bufferLen: number): Promise<Blame>;
|
32 |
|
33 | free(): void;
|
34 | |
35 |
|
36 |
|
37 | getHunkByIndex(index: number): BlameHunk;
|
38 | |
39 |
|
40 |
|
41 | getHunkByLine(lineNo: number): BlameHunk;
|
42 |
|
43 | getHunkCount(): number;
|
44 | }
|