Skip to content

Clone.clone checkoutOptions and their callback crash #1798

@MMcKester

Description

@MMcKester

Hi,

I use Clone.clone and I am looking for a progress status callback. The function has a CheckoutOptions object, which I call like this:

var opts: CloneOptions = {};
opts.checkoutOpts = {
    progressCb: function() {
        console.log("Foo");
    },
}

But that seems to crash the BrowserWindow of my electron app where I use this. Does anyone know, by looking at the declaration of CheckoutOptions what I might doing wrong?

Notice, CheckoutOptions is a member of CloneOptions

export class CheckoutOptions {
    version?: number;
    checkoutStrategy?: number;
    disableFilters?: number;
    dirMode?: number;
    fileMode?: number;
    fileOpenFlags?: number;
    notifyFlags?: number;
    notifyCb?: any;
    notifyPayload?: undefined;
    progressCb?: any;
    progressPayload?: undefined;
    paths?: Strarray | string | string[];
    baseline?: Tree;
    baselineIndex?: Index;
    targetDirectory?: string;
    ancestorLabel?: string;
    ourLabel?: string;
    theirLabel?: string;
    perfdataCb?: any;
    perfdataPayload?: undefined;
    [key: string]: any;
}

export class CloneOptions {
    version?: number;
    checkoutOpts?: CheckoutOptions;
    fetchOpts?: FetchOptions;
    bare?: number;
    local?: number;
    checkoutBranch?: string;
    repositoryCbPayload?: any;
    remoteCbPayload?: any;
}

Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions