Gjsify LogoGjsify Logo

Represents a git submodule.

record

Hierarchy

  • Submodule

Index

Constructors

Properties

name: string

Methods

  • get_fetch_recurse(): boolean
  • get_head_id(): OId
  • get_index_id(): OId
  • get_name(): string
  • get_path(): string
  • Gets the path to the submodule from the repo working directory. It is almost always the same as the name. See ggit_submodule_get_name().

    Returns string

  • get_url(): string
  • Gets the url for the submodule or %NULL if the submodule has been deleted but not yet committed.

    Returns string

  • get_workdir_id(): OId
  • Gets the OID for the submodule in the current working directory. Corresponds to looking up 'HEAD' in the checked out submodule. If there are pending changes in the index or anything else, this won't notice that. You should call ggit_submodule_status() for a more complete picture about the state of the working directory.

    Returns OId

  • init(overwrite: boolean): void
  • Just like "git submodule init", this copies information about the submodule into ".git/config". You can use the accessor functions above to alter the in-memory git_submodule object and control what is written to the config, overriding what is in .gitmodules.

    Parameters

    • overwrite: boolean

      forces existing entries to be updated.

    Returns void

  • Open the repository for a submodule. Multiple calls to this function will return distinct #GgitRepository objects. Only submodules which are checked out in the working directory can be opened.

    Returns Ggit.Repository

  • reload(force: boolean): void
  • Rereads submodule info from config, index, and HEAD. Call this if you have reason to believe that it has changed.

    Parameters

    • force: boolean

      reload even if the data doesn't seem out of date.

    Returns void

  • sync(): void
  • Copies the information about the submodules URL into the checked out submodule config, acting like "git submodule sync". This is useful if you have altered the URL for the submodule (or it has been altered by a fetch of upstream changes) and you need to update your local repo.

    Returns void

  • unref(): void
  • Atomically decrements the reference count of submodule by one. If the reference count drops to 0, remote is freed.

    Returns void

  • Update a submodule. This will clone a missing submodule and checkout the subrepository to the commit specified in the index of the containing repository. If the submodule repository doesn't contain the target commit (e.g. because fetchRecurseSubmodules isn't set), then the submodule is fetched using the fetch options supplied in options.

    Parameters

    • init: boolean

      If the submodule is not initialized, setting this flag to true will initialize the submodule before updating. Otherwise, this will return an error if attempting to update an uninitialzed repository. but setting this to true forces them to be updated.

    • options: SubmoduleUpdateOptions

      a #GgitSubmoduleUpdateOptions object.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method