![]() |
![]() |
![]() |
libgit2-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
GgitIndex; struct GgitIndexClass; GgitIndex * ggit_index_open (GFile *file
,GError **error
); gboolean ggit_index_read (GgitIndex *idx
,GError **error
); gboolean ggit_index_write (GgitIndex *idx
,GError **error
); gboolean ggit_index_remove (GgitIndex *idx
,GFile *file
,gint stage
,GError **error
); gboolean ggit_index_add (GgitIndex *idx
,GgitIndexEntry *entry
,GError **error
); GgitIndexEntries * ggit_index_get_entries (GgitIndex *idx
); GgitIndexEntriesResolveUndo * ggit_index_get_entries_resolve_undo (GgitIndex *idx
);
GgitIndex * ggit_index_open (GFile *file
,GError **error
);
Create a new bare Git index object as a memory representation of the Git
index file in file
, without a repository to back it.
|
a GFile. |
|
a GError. |
Returns : |
a GgitIndex or NULL if an error occurred. [transfer full]
|
gboolean ggit_index_read (GgitIndex *idx
,GError **error
);
Update the contents of an existing index object in memory by reading from the hard disk.
|
a GgitIndex. |
|
a GError. |
Returns : |
TRUE if the index could be read from the file associated with the
index, FALSE otherwise. |
gboolean ggit_index_write (GgitIndex *idx
,GError **error
);
Write an existing index object from memory back to disk using an atomic file lock.
|
a GgitIndex. |
|
a GError. |
Returns : |
TRUE if the index was successfully written to disk, FALSE otherwise. |
gboolean ggit_index_remove (GgitIndex *idx
,GFile *file
,gint stage
,GError **error
);
Remove a file from the index (specified by position).
|
a GgitIndex. |
|
the file to search. |
|
the stage to search. |
|
a GError. |
Returns : |
TRUE if the file was successfully removed, FALSE otherwise. |
gboolean ggit_index_add (GgitIndex *idx
,GgitIndexEntry *entry
,GError **error
);
Add a file to the index.
|
a GgitIndex. |
|
a GgitIndexEntry |
|
a GError. |
Returns : |
TRUE if the file was successfully added, FALSE otherwise. |
GgitIndexEntries * ggit_index_get_entries (GgitIndex *idx
);
Get the index entries enumerator.
|
a GgitIndex. |
Returns : |
a GgitIndexEntries. [transfer full] |
GgitIndexEntriesResolveUndo * ggit_index_get_entries_resolve_undo
(GgitIndex *idx
);
Get the resolve undo entries enumerator.
|
a GgitIndex. |
Returns : |
a GgitIndexEntriesResolveUndo. [transfer full] |