Ggit.DiffLine

Fields

None

Methods

  get_content ()
  get_content_offset ()
  get_new_lineno ()
  get_old_lineno ()
  get_origin ()
  get_text ()
  ref ()
  unref ()

Details

class Ggit.DiffLine

Represents the line of a diff.

get_content()
Returns:the content in bytes.
Return type:bytes

Gets the content in bytes.

get_content_offset()
Returns:the content offset.
Return type:int

Gets the content offset.

get_new_lineno()
Returns:the line’s old number of lines.
Return type:int

Gets the Line number in new file or -1 for deleted line.

get_old_lineno()
Returns:the line’s old line number.
Return type:int

Gets the line number in old file or -1 for added line.

get_origin()
Returns:the Ggit.DiffLineType value.
Return type:Ggit.DiffLineType

Gets the Ggit.DiffLineType value.

get_text()
Returns:the content in utf-8 encoding or None.
Return type:str or None

Get the content of the diff line as UTF-8 encoded text.

ref()
Returns:a Ggit.DiffLine or None.
Return type:Ggit.DiffLine or None

Atomically increments the reference count of self by one. This function is MT-safe and may be called from any thread.

unref()

Atomically decrements the reference count of self by one. If the reference count drops to 0, self is freed.