1 | import { AnnotatedCommit } from "./annotated-commit";
|
2 | import { CheckoutOptions } from "./checkout-options";
|
3 | import { Index, MergeOptions, Tree } from "./index";
|
4 | import { Oid } from "./oid";
|
5 | import { RebaseOperation } from "./rebase-operation";
|
6 | import { Repository } from "./repository";
|
7 | import { Signature } from "./signature";
|
8 |
|
9 | export interface RebaseOptions<PayloadType = any> {
|
10 | version?: number | null;
|
11 | quiet?: number | null;
|
12 | inmemory?: number | null;
|
13 | rewriteNotesRef?: string | null;
|
14 | mergeOptions?: MergeOptions | null;
|
15 | checkoutOptions?: CheckoutOptions | null;
|
16 | commitCreateCb?:
|
17 | | ((
|
18 | author: Signature,
|
19 | committer: Signature,
|
20 | message_encoding: string,
|
21 | message: string,
|
22 | tree: Tree,
|
23 | parent_count: number,
|
24 | parents: Oid[],
|
25 | payload?: PayloadType,
|
26 | ) => Oid)
|
27 | | null;
|
28 | payload?: PayloadType | null;
|
29 | }
|
30 |
|
31 | export class Rebase {
|
32 | static init(
|
33 | repo: Repository,
|
34 | branch: AnnotatedCommit | undefined | null,
|
35 | upstream?: AnnotatedCommit | null,
|
36 | onto?: AnnotatedCommit | null,
|
37 | opts?: RebaseOptions | null,
|
38 | ): Promise<Rebase>;
|
39 | static initOptions(opts: RebaseOptions, version: number): number;
|
40 | static open(repo: Repository, opts?: RebaseOptions): Promise<Rebase>;
|
41 |
|
42 | abort(): number;
|
43 | commit(
|
44 | author: Signature | undefined | null,
|
45 | committer: Signature,
|
46 | messageEncoding?: string | null,
|
47 | message?: string | null,
|
48 | ): Promise<Oid>;
|
49 | finish(signature?: Signature | null): number;
|
50 | inmemoryIndex(index: Index): number;
|
51 | next(): Promise<RebaseOperation>;
|
52 | operationByIndex(idx: number): RebaseOperation;
|
53 | operationCurrent(): number;
|
54 | operationEntrycount(): number;
|
55 | }
|