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