Skip to content

peel

Recursively peel an object until an object of the specified type is met.

Signature

ts
class GitObject {
  peel(objType: ObjectType): GitObject;
}

Parameters

  • objTyperequired · ObjectType

    If you pass Any as the target type, then the object will be peeled until the type changes (e.g. a tag will be chased until the referenced object is no longer a tag).

    - Any : Any kind of git object
    - Commit : An object which corresponds to a git commit
    - Tree : An object which corresponds to a git tree
    - Blob : An object which corresponds to a git blob
    - Tag : An object which corresponds to a git tag

Returns

  • GitObject

    Git object which recursively peeled.

Released under the MIT License.