Gjsify LogoGjsify Logo

Represents a patch object.

record

Hierarchy

  • Patch

Index

Constructors

Properties

name: string

Methods

  • get_line_stats(): [boolean, number, number, number]
  • get_num_hunks(): number
  • get_num_lines_in_hunk(hunk: number): number
  • Atomically increments the reference count of patch by one. This function is MT-safe and may be called from any thread.

    Returns Patch

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

    Returns void

  • Directly generate a patch from the difference between two blobs.

    This is just like ggit_diff_blobs() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard ggit_patch accessor functions to read the patch data, and you must call ggit_patch_unref on the patch when done.

    Parameters

    • old_blob: Ggit.Blob

      a #GgitBlob to diff from.

    • old_as_path: string

      treat old_blob as if it had this filename, or %NULL,

    • new_blob: Ggit.Blob

      a #GgitBlob to diff to.

    • new_as_path: string

      treat new_blob as if it had this filename, or %NULL,

    • diff_options: DiffOptions

      a #GgitDiffOptions, or %NULL.

    Returns Patch

  • The #GgitPatch is a newly created object contains the text diffs for the delta. You have to call ggit_patch_unref() when you are done with it. You can use the patch object to loop over all the hunks and lines in the diff of the one delta.

    Parameters

    • diff: Ggit.Diff

      a #GgitDiff.

    • idx: number

      index into diff list.

    Returns Patch

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