Method

GgitIndexEntriesget_by_index

Declaration [src]

GgitIndexEntry*
ggit_index_entries_get_by_index (
  GgitIndexEntries* entries,
  gsize idx
)

Description [src]

Get a GgitIndexEntry by index. Note that the returned GgitIndexEntry is only valid as long as:

1) The associated index has been closed 2) The entry has not been removed (see ggit_index_remove()) 3) The index has not been refreshed (see ggit_index_read())

Changes to the GgitIndexEntry will be reflected in the index once written back to disk using ggit_index_write().

Parameters

idx gsize
 

The index of the entry.

Return value

Returns: GgitIndexEntry
 

A GgitIndexEntry or NULL if out of bounds.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The return value can be NULL.