![]() |
![]() |
![]() |
libgit2-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
GgitIndexEntries; GgitIndexEntry; GgitIndexEntries * ggit_index_entries_ref (GgitIndexEntries *entries
); void ggit_index_entries_unref (GgitIndexEntries *entries
); GgitIndexEntry * ggit_index_entries_get_by_index (GgitIndexEntries *entries
,gsize idx
); GgitIndexEntry * ggit_index_entries_get_by_path (GgitIndexEntries *entries
,GFile *file
,gboolean stage
); guint ggit_index_entries_size (GgitIndexEntries *entries
); GgitIndexEntry * ggit_index_entry_ref (GgitIndexEntry *entry
); void ggit_index_entry_unref (GgitIndexEntry *entry
); guint ggit_index_entry_get_dev (GgitIndexEntry *entry
); void ggit_index_entry_set_dev (GgitIndexEntry *entry
,guint dev
); guint ggit_index_entry_get_ino (GgitIndexEntry *entry
); void ggit_index_entry_set_ino (GgitIndexEntry *entry
,guint ino
); guint ggit_index_entry_get_mode (GgitIndexEntry *entry
); void ggit_index_entry_set_mode (GgitIndexEntry *entry
,guint mode
); guint ggit_index_entry_get_uid (GgitIndexEntry *entry
); void ggit_index_entry_set_uid (GgitIndexEntry *entry
,guint uid
); guint ggit_index_entry_get_gid (GgitIndexEntry *entry
); void ggit_index_entry_set_gid (GgitIndexEntry *entry
,guint gid
); goffset ggit_index_entry_get_file_size (GgitIndexEntry *entry
); void ggit_index_entry_set_file_size (GgitIndexEntry *entry
,goffset file_size
); GgitOId * ggit_index_entry_get_id (GgitIndexEntry *entry
); void ggit_index_entry_set_id (GgitIndexEntry *entry
,GgitOId *id
); guint ggit_index_entry_get_flags (GgitIndexEntry *entry
); void ggit_index_entry_set_flags (GgitIndexEntry *entry
,guint flags
); guint ggit_index_entry_get_flags_extended (GgitIndexEntry *entry
); void ggit_index_entry_set_flags_extended (GgitIndexEntry *entry
,guint flags_extended
); const gchar * ggit_index_entry_get_path (GgitIndexEntry *entry
); void ggit_index_entry_set_path (GgitIndexEntry *entry
,const gchar *path
); gboolean ggit_index_entry_stat (GgitIndexEntry *entry
,GFile *file
,GError **error
);
typedef struct _GgitIndexEntries GgitIndexEntries;
Represents the entries in an index object.
GgitIndexEntries * ggit_index_entries_ref (GgitIndexEntries *entries
);
Atomically increments the reference count of entries
by one.
This function is MT-safe and may be called from any thread.
|
a GgitIndexEntries. |
Returns : |
a GgitIndexEntries. [transfer none] |
void ggit_index_entries_unref (GgitIndexEntries *entries
);
Atomically decrements the reference count of entries
by one.
If the reference count drops to 0, entries
is freed.
|
a GgitIndexEntries. |
GgitIndexEntry * ggit_index_entries_get_by_index (GgitIndexEntries *entries
,gsize idx
);
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()
.
|
a GgitIndexEntries. |
|
the index of the entry. |
Returns : |
a GgitIndexEntry or NULL if out of bounds. [transfer full]
|
GgitIndexEntry * ggit_index_entries_get_by_path (GgitIndexEntries *entries
,GFile *file
,gboolean stage
);
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()
.
|
a GgitIndexEntries. |
|
the path to search. |
|
stage to search. |
Returns : |
a GgitIndexEntry or NULL if it was not found. [transfer full]
|
guint ggit_index_entries_size (GgitIndexEntries *entries
);
Get the number of GgitIndexEntry entries.
|
a GgitIndexEntries. |
Returns : |
the number of entries. |
GgitIndexEntry * ggit_index_entry_ref (GgitIndexEntry *entry
);
Atomically increments the reference count of entry
by one.
This function is MT-safe and may be called from any thread.
|
a GgitIndexEntry. |
Returns : |
a GgitIndexEntry. [transfer none] |
void ggit_index_entry_unref (GgitIndexEntry *entry
);
Atomically decrements the reference count of entry
by one.
If the reference count drops to 0, entry
is freed.
|
a GgitIndexEntry. |
guint ggit_index_entry_get_dev (GgitIndexEntry *entry
);
Get the dev of the index entry.
|
a GgitIndexEntry. |
Returns : |
the dev. |
void ggit_index_entry_set_dev (GgitIndexEntry *entry
,guint dev
);
Set the dev of the index entry.
|
a GgitIndexEntry. |
|
the dev. |
guint ggit_index_entry_get_ino (GgitIndexEntry *entry
);
Get the ino of the index entry.
|
a GgitIndexEntry. |
Returns : |
the ino. |
void ggit_index_entry_set_ino (GgitIndexEntry *entry
,guint ino
);
Set the ino of the index entry.
|
a GgitIndexEntry. |
|
the ino. |
guint ggit_index_entry_get_mode (GgitIndexEntry *entry
);
Get the mode of the index entry.
|
a GgitIndexEntry. |
Returns : |
the mode. |
void ggit_index_entry_set_mode (GgitIndexEntry *entry
,guint mode
);
Set the mode of the index entry.
|
a GgitIndexEntry. |
|
the mode. |
guint ggit_index_entry_get_uid (GgitIndexEntry *entry
);
Get the uid of the index entry.
|
a GgitIndexEntry. |
Returns : |
the uid. |
void ggit_index_entry_set_uid (GgitIndexEntry *entry
,guint uid
);
Set the uid of the index entry.
|
a GgitIndexEntry. |
|
the uid. |
guint ggit_index_entry_get_gid (GgitIndexEntry *entry
);
Get the gid of the index entry.
|
a GgitIndexEntry. |
Returns : |
the gid. |
void ggit_index_entry_set_gid (GgitIndexEntry *entry
,guint gid
);
Set the gid of the index entry.
|
a GgitIndexEntry. |
|
the gid. |
goffset ggit_index_entry_get_file_size (GgitIndexEntry *entry
);
Get the file size of the index entry.
|
a GgitIndexEntry. |
Returns : |
the file size. |
void ggit_index_entry_set_file_size (GgitIndexEntry *entry
,goffset file_size
);
Set the file size of the index entry.
|
a GgitIndexEntry. |
|
the file size. |
GgitOId * ggit_index_entry_get_id (GgitIndexEntry *entry
);
Get the oid of the index entry.
|
a GgitIndexEntry. |
Returns : |
the oid. |
void ggit_index_entry_set_id (GgitIndexEntry *entry
,GgitOId *id
);
Set the oid of the index entry.
|
a GgitIndexEntry. |
|
the oid. [allow-none] |
guint ggit_index_entry_get_flags (GgitIndexEntry *entry
);
Get the flags of the index entry.
|
a GgitIndexEntry. |
Returns : |
the flags. |
void ggit_index_entry_set_flags (GgitIndexEntry *entry
,guint flags
);
Set the flags of the index entry.
|
a GgitIndexEntry. |
|
the flags. |
guint ggit_index_entry_get_flags_extended (GgitIndexEntry *entry
);
Get the extended flags of the index entry.
|
a GgitIndexEntry. |
Returns : |
the extended flags. |
void ggit_index_entry_set_flags_extended (GgitIndexEntry *entry
,guint flags_extended
);
Set the extended flags of the index entry.
|
a GgitIndexEntry. |
|
the extended flags. |
void ggit_index_entry_set_path (GgitIndexEntry *entry
,const gchar *path
);
Set the path of the index entry. The path should be relative to the working directory.
|
a GgitIndexEntry. |
|
the path. [allow-none] |
gboolean ggit_index_entry_stat (GgitIndexEntry *entry
,GFile *file
,GError **error
);
Fill the entry fields from statting file
.
|
a GgitIndexEntry. |
|
the file to stat. |
|
a GError for error reporting, or NULL . |
Returns : |
TRUE if the entry was filled from statting file successfully, FALSE otherwise. |