Ggit.IndexEntries¶
Fields¶
None
Methods¶
|
|
|
|
|
|
|
|
|
Details¶
- class Ggit.IndexEntries¶
Represents the entries in an index object.
- get_by_index(idx)¶
- Parameters:
idx (
int
) – the index of the entry.- Returns:
a
Ggit.IndexEntry
orNone
if out of bounds.- Return type:
Get a
Ggit.IndexEntry
by index. Note that the returnedGgit.IndexEntry
is _only_ valid as long as:The associated index has been closed
The entry has not been removed (see
Ggit.Index.remove
())The index has not been refreshed (see
Ggit.Index.read
())
Changes to the
Ggit.IndexEntry
will be reflected in the index once written back to disk usingGgit.Index.write
().
- get_by_path(file, stage)¶
- Parameters:
- Returns:
a
Ggit.IndexEntry
orNone
if it was not found.- Return type:
Get a
Ggit.IndexEntry
by index. Note that the returnedGgit.IndexEntry
is _only_ valid as long as:The associated index has not been closed
The entry has not been removed (see
Ggit.Index.remove
())The index has not been refreshed (see
Ggit.Index.read
())
Changes to the
Ggit.IndexEntry
will be reflected in the index once written back to disk usingGgit.Index.write
().stage indicates the stage to search the file for. Stages are used in the index when merge conflicts occur, such that multiple versions of the same file can be represented in the index. Stage 0 is associated with the working tree, while stages 1 to 3 are associated with the various versions of the file in a merge conflict. The special value -1 can be used to match the first file encountered in any stage.
- ref()¶
- Returns:
a
Ggit.IndexEntries
orNone
.- Return type:
Atomically increments the reference count of self by one. This function is MT-safe and may be called from any thread.
- size()¶
- Returns:
the number of entries.
- Return type:
Get the number of
Ggit.IndexEntry
entries.
- unref()¶
Atomically decrements the reference count of self by one. If the reference count drops to 0, self is freed.