UNPKG

881 BTypeScriptView Raw
1import { MergeOptions } from './merge-options';
2import { CheckoutOptions } from './checkout-options';
3import { Repository } from './repository';
4import { Commit } from './commit';
5import { Index } from './index';
6
7export interface RevertOptions {
8 version?: number | undefined;
9 mainline?: number | undefined;
10 mergeOpts?: MergeOptions | undefined;
11 checkoutOpts?: CheckoutOptions | undefined;
12 [key: string]: any;
13}
14
15export class Revert {
16 static revert(repo: Repository, commit: Commit, givenOpts?: RevertOptions): Promise<number>;
17 /**
18 * Reverts the given commit against the given "our" commit, producing an index that reflects the result of the revert.
19 */
20 static commit(
21 repo: Repository,
22 revertCommit: Commit,
23 ourCommit: Commit,
24 mainline: number,
25 mergeOptions?: MergeOptions,
26 ): Promise<Index>;
27}