UNPKG

845 BTypeScriptView Raw
1import { Repository } from './repository';
2import { Commit } from './commit';
3import { MergeOptions } from './merge-options';
4import { CherrypickOptions } from './cherry-pick-options';
5
6export class Cherrypick {
7 /**
8 * Cherrypick a commit and, changing the index and working directory
9 */
10 static cherrypick(repo: Repository, commit: Commit, options?: CherrypickOptions): Promise<number>;
11 /**
12 * Cherrypicks the given commit against "our" commit, producing an index that reflects the result of the cherrypick. The index is not backed by a repo.
13 */
14 static commit(
15 repo: Repository,
16 cherrypickCommit: Commit,
17 ourCommit: Commit,
18 mainline: number,
19 mergeOptions?: MergeOptions,
20 ): Promise<number>;
21 static initOptions(opts: CherrypickOptions, version: number): number;
22}