Ggit.Reflog

Fields

None

Methods

  append (oid, committer, message)
  get_entry_count ()
  get_entry_from_index (idx)
  ref ()
  rename (new_name)
  unref ()
  write ()

Details

class Ggit.Reflog

Represents a reflog.

append(oid, committer, message)
Parameters:
Raises:

GLib.Error

Returns:

True if the reflog was successfully created, or False if error is set.

Return type:

bool

Creates a reflog entry.

get_entry_count()
Returns:the number of log entries.
Return type:int

Gets the number of log entries in self.

get_entry_from_index(idx)
Parameters:idx (int) – the position to lookup.
Returns:the reflog entry at the index, or None if not found.
Return type:Ggit.ReflogEntry or None

Gets the Ggit.ReflogEntry at idx in self, or None if not found.

ref()
Returns:the passed in Ggit.Reflog or None.
Return type:Ggit.Reflog or None

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

rename(new_name)
Parameters:new_name (str) – the new name of the reference.
Raises:GLib.Error
Return type:bool

Renames the reflog for to new_name, on error error is set.

unref()

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

write()
Raises:GLib.Error
Returns:True if the reflog was successfully written, or False on error.
Return type:bool

Write the reflog to disk.