Skip to content

repoInit ​

Set up the subrepository for a submodule in preparation for clone.

This function can be called to init and set up a submodule repository from a submodule in preparation to clone it from its remote.

Signature ​

ts
class Submodule {
  repoInit(
    useGitlink?: boolean | null | undefined,
    signal?: AbortSignal | null | undefined,
  ): Promise<Repository>;
}

Parameters ​

  • useGitlinknull | boolean

    Should the workdir contain a gitlink to the repo in .git/modules vs. repo directly in workdir.

  • signalnull | AbortSignal

    Optional AbortSignal to cancel the operation.

Returns ​

  • Promise<Repository>

    The repository.

Released under the MIT License.