Ggit.IndexEntry

Fields

None

Methods

get_dev ()

get_file_size ()

get_flags ()

get_flags_extended ()

get_gid ()

get_id ()

get_ino ()

get_mode ()

get_path ()

get_uid ()

is_conflict ()

ref ()

set_commit (commit)

set_dev (dev)

set_file_size (file_size)

set_flags (flags)

set_flags_extended (flags_extended)

set_gid (gid)

set_id (id)

set_ino (ino)

set_mode (mode)

set_path (path)

set_uid (uid)

stat (file)

unref ()

Details

class Ggit.IndexEntry

Represents an index entry object.

get_dev()
Returns:

the dev.

Return type:

int

Get the dev of the index entry.

get_file_size()
Returns:

the file size.

Return type:

int

Get the file size of the index entry.

get_flags()
Returns:

the flags.

Return type:

int

Get the flags of the index entry.

get_flags_extended()
Returns:

the extended flags.

Return type:

int

Get the extended flags of the index entry.

get_gid()
Returns:

the gid.

Return type:

int

Get the gid of the index entry.

get_id()
Returns:

the oid or None.

Return type:

Ggit.OId or None

Get the oid of the index entry.

get_ino()
Returns:

the ino.

Return type:

int

Get the ino of the index entry.

get_mode()
Returns:

the mode.

Return type:

int

Get the mode of the index entry.

get_path()
Return type:

str

get_uid()
Returns:

the uid.

Return type:

int

Get the uid of the index entry.

is_conflict()
Returns:

True if the entry is a conflict, or False otherwise.

Return type:

bool

Get whether the entry represents a conflict.

ref()
Returns:

a Ggit.IndexEntry or None.

Return type:

Ggit.IndexEntry or None

Atomically increments the reference count of self by one. This function is MT-safe and may be called from any thread.

set_commit(commit)
Parameters:

commit (Ggit.Commit) – a Ggit.Commit.

Set the index entry to point to a given commit. This sets the index entry id to the commit id, changes the mode to Ggit.FileMode.COMMIT and updates the timestamps to when the commit was made.

set_dev(dev)
Parameters:

dev (int) – the dev.

Set the dev of the index entry.

set_file_size(file_size)
Parameters:

file_size (int) – the file size.

Set the file size of the index entry.

set_flags(flags)
Parameters:

flags (int) – the flags.

Set the flags of the index entry.

set_flags_extended(flags_extended)
Parameters:

flags_extended (int) – the extended flags.

Set the extended flags of the index entry.

set_gid(gid)
Parameters:

gid (int) – the gid.

Set the gid of the index entry.

set_id(id)
Parameters:

id (Ggit.OId or None) – the oid.

Set the oid of the index entry.

set_ino(ino)
Parameters:

ino (int) – the ino.

Set the ino of the index entry.

set_mode(mode)
Parameters:

mode (int) – the mode.

Set the mode of the index entry.

set_path(path)
Parameters:

path (str or None) – the path.

Set the path of the index entry. The path should be relative to the working directory.

set_uid(uid)
Parameters:

uid (int) – the uid.

Set the uid of the index entry.

stat(file)
Parameters:

file (Gio.File) – the file to stat.

Raises:

GLib.Error

Returns:

True if the entry was filled from statting file successfully, False otherwise.

Return type:

bool

Fill the entry fields from statting file.

unref()

Atomically decrements the reference count of self by one. If the reference count drops to 0, self is freed.