Skip to content

Clone.clone checkoutOptions and their callback crash #1798

Closed

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!

Activity

  1. implausible commented on Oct 6, 2020

    @implausible
    Member

    This will be fixed in #1795. It looks like we specified the wrong return type for git_checkout_progress_cb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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