Top |
Functions
Functions
ggit_index_entries_ref ()
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.
ggit_index_entries_unref ()
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.
ggit_index_entries_get_by_index ()
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()
.
ggit_index_entries_get_by_path ()
GgitIndexEntry * ggit_index_entries_get_by_path (GgitIndexEntries *entries
,GFile *file
,gint stage
);
Get a GgitIndexEntry by index. Note that the returned GgitIndexEntry is _only_ valid as long as:
1) The associated index has not 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()
.
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.
ggit_index_entries_size ()
guint
ggit_index_entries_size (GgitIndexEntries *entries
);
Get the number of GgitIndexEntry entries.
ggit_index_entry_ref ()
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.
ggit_index_entry_unref ()
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.
ggit_index_entry_get_dev ()
guint
ggit_index_entry_get_dev (GgitIndexEntry *entry
);
Get the dev of the index entry.
ggit_index_entry_set_dev ()
void ggit_index_entry_set_dev (GgitIndexEntry *entry
,guint dev
);
Set the dev of the index entry.
ggit_index_entry_get_ino ()
guint
ggit_index_entry_get_ino (GgitIndexEntry *entry
);
Get the ino of the index entry.
ggit_index_entry_set_ino ()
void ggit_index_entry_set_ino (GgitIndexEntry *entry
,guint ino
);
Set the ino of the index entry.
ggit_index_entry_get_mode ()
guint
ggit_index_entry_get_mode (GgitIndexEntry *entry
);
Get the mode of the index entry.
ggit_index_entry_set_mode ()
void ggit_index_entry_set_mode (GgitIndexEntry *entry
,guint mode
);
Set the mode of the index entry.
ggit_index_entry_get_uid ()
guint
ggit_index_entry_get_uid (GgitIndexEntry *entry
);
Get the uid of the index entry.
ggit_index_entry_set_uid ()
void ggit_index_entry_set_uid (GgitIndexEntry *entry
,guint uid
);
Set the uid of the index entry.
ggit_index_entry_get_gid ()
guint
ggit_index_entry_get_gid (GgitIndexEntry *entry
);
Get the gid of the index entry.
ggit_index_entry_set_gid ()
void ggit_index_entry_set_gid (GgitIndexEntry *entry
,guint gid
);
Set the gid of the index entry.
ggit_index_entry_get_file_size ()
goffset
ggit_index_entry_get_file_size (GgitIndexEntry *entry
);
Get the file size of the index entry.
ggit_index_entry_set_file_size ()
void ggit_index_entry_set_file_size (GgitIndexEntry *entry
,goffset file_size
);
Set the file size of the index entry.
ggit_index_entry_get_id ()
GgitOId *
ggit_index_entry_get_id (GgitIndexEntry *entry
);
Get the oid of the index entry.
ggit_index_entry_set_id ()
void ggit_index_entry_set_id (GgitIndexEntry *entry
,GgitOId *id
);
Set the oid of the index entry.
ggit_index_entry_get_flags ()
guint
ggit_index_entry_get_flags (GgitIndexEntry *entry
);
Get the flags of the index entry.
ggit_index_entry_set_flags ()
void ggit_index_entry_set_flags (GgitIndexEntry *entry
,guint flags
);
Set the flags of the index entry.
ggit_index_entry_get_flags_extended ()
guint
ggit_index_entry_get_flags_extended (GgitIndexEntry *entry
);
Get the extended flags of the index entry.
ggit_index_entry_set_flags_extended ()
void ggit_index_entry_set_flags_extended (GgitIndexEntry *entry
,guint flags_extended
);
Set the extended flags of the index entry.
ggit_index_entry_set_path ()
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.
ggit_index_entry_stat ()
gboolean ggit_index_entry_stat (GgitIndexEntry *entry
,GFile *file
,GError **error
);
Fill the entry fields from statting file
.